For Calculating a Whole-Numbered Grocery Bill

This is a little piece I wrote in 2014.

Here’s the formula for calculating an even amount for your groceries at the supermarket.

Let ”T” be the total price of the order, ”P” be the price of a non-taxable item, ”G” be the price of a taxable item, ”t” be the tax on a taxable item (usually a percentage), ”n” is the number of non-taxable items in the order, and ”m” is the number of taxable items in the order. For the bill of your groceries to be an even amount, the following must be satisfied:

  T = $\displaystyle\sum\limits_{i=1}^n P_{n}$ + $\displaystyle\sum\limits_{i=1}^m G_{m}$ (1 + t)
All one needs to do is find an item Pn or Gm which makes ”T” a whole number. To put it in another way, you must satisfy this condition:

  $\displaystyle\sum\limits_{i=1}^m G_{m}=\frac{T - \sum\limits_{i=1}^n P_{n}}{(1 + t)}$
Where \displaystyle\sum\limits_{i=1}^m G_{m} equals a whole number.

So the next time someone at the checkout stand looks at their total and says, ”I can’t do that again even if I tried,” show them this article and explain to them that it can be done.