My apologies if this question is in the wrong section.
Couple of my roommates & I (total 5 people) share the groceries expenses. We record the purchases in an Excel sheet, and also have the ratio of consumption of individual items specified for each member.
For eg.
- Roommate A doesn't consume Milk and Jam, but consumes Bread equally and Butter most, so
1. Milk = 0%
2. Jam = 0%
3. Bread = 20% (total expense for Bread equally divided between 5)
4. Butter = 50% (total expense for Butter as per consumption ratio)
- Roommate B doesn't consume Milk, but consumes Jam and Bread equally and Butter more, so
1. Milk = 0%
2. Jam = 25% (total expense for Jam equally divided between 4)
3. Bread = 20% (total expense for Bread equally divided between 5)
4. Butter = 30% (total expense for Butter divided as per consumption ratio)
- Roommate C doesn't consume Butter but consumes Milk, Jam and Bread equally, so
1. Milk = 50% (total expense for Milk equally divided between 2)
2. Jam = 25% (total expense for Jam equally divided between 4)
3. Bread = 20% (total expense for Bread equally divided between 5)
4. Butter = 0%
- Roommate D doesn't consume Milk, but consumes Jam and Bread equally and Butter less, so
1. Milk = 0%
2. Jam = 25% (total expense for Jam divided by 4)
3. Bread = 20% (total expense for Bread divided by 5)
4. Butter = 10% (total expense for Butter divide as per consumption ratio)
- Roommate E consumes Milk, Jam and Bread equally and Butter less, so
1. Milk = 50% (total expense for Milk equally divided between 2)
2. Jam = 25% (total expense for Jam divided by 4)
3. Bread = 20% (total expense for Bread divided by 5)
4. Butter = 10% (total expense for Butter divided as per consumption ratio)
Calculating individual member's share up to this stage is relatively easy, but if the duration is considered, especially when some member may not be present for the entire duration, the calculation is a
For eg.
Considering 100 days of calculation period,
- Roommate A was present only for 20 days
- Roommate B was present only for 80 days
- Roommate C was present only for 90 days
- Roommate D was present for the entire 100 days
- Roommate # was present only for 70 days
So, I am able to calculate only for the first 2 scenarios listed below, but not for the third one, which would be the most accurate.
- Share based on consumption ratio only
- Share based on attendance only
- Share based on consumption ratio AND attendance
I have really tried hard to come up with the logic for the formula, and I'm sure this is a fairly common calculation method but I just can't wrap my head around it (I don't even know the correct mathematical term for this type of calculation).
I would be very happy if someone helped me with this.
Thanks in advance.