1001Ferramentas
🪙 Utilities

Optimal Change Calculator

Given an amount in BRL, show the minimum combination of bills (200, 100, 50, 20, 10, 5, 2) and coins (1, 0.50, 0.25, 0.10, 0.05, 0.01) for change.

Hitting an amount with the fewest pieces

Closing time and you need to build the cash drawer's change float. Or you are heading to the bank and want to know how many notes of each kind you will walk out with. Mental math holds up until an odd amount like 187.43 shows up. Type the amount in reais and the page returns the combination with the fewest possible Brazilian notes and coins, from the 200 note down to the 1 centavo coin.

The method is greedy: it always takes the largest piece that fits what is left, then repeats. Greedy is not always minimal. In a made up system with coins of 1, 3 and 4, making 6 the greedy way costs 4+1+1, three coins, while 3+3 does it in two. The real escapes that trap because its denominations form a canonical system: with 200, 100, 50, 20, 10, 5, 2, 1, 0.50, 0.25, 0.10, 0.05 and 0.01, greedy always lands on the minimum.

The field expects the change amount already worked out. The page does not subtract what the customer handed over from what was owed, that part is on you. It also assumes an unlimited supply of every piece, so if the drawer has run out of 50s the answer is useless. Watch the two ends of the list: the 200 note and the 1 and 5 centavo coins barely circulate in Brazil. Everything is computed in your browser.

Frequently asked questions

Why does a 1 centavo coin still show up?
It remains legal tender even though the Brazilian central bank stopped minting it in 2005. In practice, round the amount to a multiple of 5 centavos before typing it in.
Does it work for dollars or euros?
No. The denominations are hard coded to Brazilian currency. Other currencies have different sets of notes and coins, so the breakdown would be wrong.
Can I use it to prepare cash in an envelope?
Yes, it is the same calculation. Enter the amount you need to hand over and you get the smallest set of notes and coins that adds up to it.

Related Tools