What this calculator does
The Money Change Calculator works out how much change a customer should receive on a cash transaction and then breaks that amount into the smallest practical number of banknotes and coins. It is a universal utility tool: it is not tied to any one region and lets you pick from common world currencies including the US Dollar (USD, the default), Euro (EUR), British Pound (GBP), Canadian Dollar (CAD), Australian Dollar (AUD), Mexican Peso (MXN), Philippine Peso (PHP), New Zealand Dollar (NZD) and Brazilian Real (BRL).
How to use it
Pick a currency and a mode. In "Calculate change" mode, enter the purchase price and the amount tendered; the tool computes the change as tendered minus purchase. In "Enter change amount" mode, you supply the change directly and skip the purchase math. The result shows the change due plus a table listing how many of each note and coin to hand over, largest first, and the total piece count.
The formula and algorithm
First the change is found: $$C = \text{Tendered} - \text{Purchase}$$ (or the entered amount). To avoid floating-point errors the amount is converted to whole subunits (cents) by multiplying by 100 and rounding. A greedy algorithm then loops over each denomination from largest to smallest, taking \(n_d = \left\lfloor \frac{r}{d} \right\rfloor\) of that piece and subtracting it from the remainder \(r \leftarrow r - n_d\,d\). For standard "canonical" coin systems such as USD, EUR and GBP, greedy gives the true minimum number of pieces.
Worked example
USD, purchase $7.50, tendered $20.00. Change $$= \$20.00 - \$7.50 = \$12.50 = 1250 \text{ cents}.$$ Greedy: one $10 (leaves 250c), one $2 (leaves 50c), one 50¢ coin (leaves 0). Result: \(1 \times \$10\), \(1 \times \$2\), \(1 \times 50\)¢ — 3 pieces in total.
FAQ
Why does it normalize to cents? Working in whole subunits avoids errors like 12.499999 producing a stray penny.
What if I disable a denomination? The greedy breakdown still runs over the remaining denominations; if it cannot reach zero it reports the residual. Keep the smallest coin enabled to guarantee exact change.
Is greedy always optimal? For canonical national coin systems, yes. With unusual or disabled denomination sets it returns a valid but not always globally minimal breakdown.