Calculates the division of expenses. See the readme for an example.