We are currently putting together some sales reports for our company, and noticed some oddities when we have multiple tax rates, and it's bugging me as to why this is happening.
| Tax Rate | Retail Price (R) | Tax Amount (retail) | Cost Price (C) | Tax Amount (cost) |
|---|---|---|---|---|
| 0.2 | 1492.925 | 298.63 | 1036.68 | 207.31 |
| 0.05 | 1632.27619 | 81.63 | 1159.66 | 57.98 |
When we calculate the percentages and figures in isolation, the values are all correct.
However, when we add them all together, the percentage of tax between retail and cost is different:
Retail:
(298.63 + 81.63) / (1492.93 + 1632.28) * 100 == 12.17
Cost:
(207.31 + 57.98) / (1036.68 + 1159.66) * 100 == 12.08
I would have expected the two blended percentages to have the same value. Shouldn't both calculations give the same result?