b2KIT

Change Maker / Cash Register

Calculate optimal change to give customers using minimum coins and bills from amount tendered and purchase total.

Tested tool guide Tested browser tools Checked August 16, 2026

What Change Maker / Cash Register does, with a checked example

Some cash registers still leave the decision to you: which bills and coins to hand back. Enter the purchase total and the amount tendered, and this tool returns the difference broken into the fewest possible pieces - a $10 bill and a few coins where eleven singles would also work. It works the way a drawer is organized, largest denomination first, and in the US bill-and-coin system that order also happens to be provably optimal. The most common mistake is entering the pre-tax total and getting change short by the tax. Everything is computed in the browser; nothing is uploaded.

Worked example

A concrete input and expected output from the current implementation.

Input

Purchase total: 8.42 / Amount tendered: 20.00

Expected output

Change due: $11.58, as 1 x $10, 1 x $1, 2 x 25c, 1 x 5c, 3 x 1c (8 pieces total)

$20.00 minus $8.42 is $11.58. Largest first: one $10 leaves $1.58, one $1 leaves 58 cents, two quarters leave 8 cents, one nickel leaves 3 cents, three pennies close it out. Eight pieces is the minimum: 58 cents cannot be made from fewer than six coins, so two bills plus six coins is the best possible.

How the result is produced

1

One subtraction, then largest first

The arithmetic is one subtraction: change due equals amount tendered minus purchase total. The tool then walks the denomination list - $100, $50, $20, $10, $5, $1, 25c, 10c, 5c, 1c - and for each one subtracts as many copies as fit without going negative. In the US system this largest-first rule is provably optimal, so the piece count shown is the true minimum, not just a convenient habit.

2

Input is two numbers, output is a breakdown

Input is plain dollars-and-cents decimals; the output is the total change, a count per denomination, and the overall number of pieces. The tool only knows the two numbers you typed, so it assumes an unlimited supply of every denomination. The answer is the minimum-piece ideal for the amount, not necessarily what you can hand over from a drawer that is out of quarters or short on $1 bills.

Good uses

  • A barista or shop clerk double-checks the bills and coins they are about to give back when the register does not tell them which denominations to use.
  • Someone new to cash handling practices by entering the day's typical totals and comparing the breakdown with counting up from the purchase amount.
  • A manager preparing a till float decides how many $10s, $5s, and rolls of coins the drawer should start the shift with.

Limits and checks

  • Enter the after-tax total. The tool has no tax logic, so a pre-tax purchase total gives change that is short by exactly the sales tax amount.
  • The breakdown assumes every denomination is available. A drawer missing quarters or $1 bills forces a different combination; keep the same total and substitute.
  • When the amount tendered is less than the purchase total there is no valid change. Read that as insufficient payment, not as money you are owed.

Common questions

Why does the result use fewer pieces than what I would actually hand a customer?

Because the tool's goal is the minimum number of pieces, and counting up from the purchase total to the tendered amount produces that same breakdown whenever the drawer holds every denomination. An experienced cashier may still break a $5 into singles to keep the drawer workable; that is a stocking choice, not an arithmetic difference.

Does it handle sales tax or other currencies?

No to both. There is no tax-rate field, so enter the tax-inclusive total. The denomination list is US only: bills $1 through $100, coins 1c through 25c. In a currency with non-multiple denominations like a 30c coin, fewest-pieces is not guaranteed by the largest-first rule, and the breakdown would not match local practice.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools