Limited Coin Change Calculator
Enter face values, counts and the coins you need to keep. See which amounts you can make, how many denomination combinations reach them, and the fewest usable coins required.
Find exact change with the coins you have
Count your stock, keep a reserve and find the fewest usable coins for your amount.
Coin stock and target
One row per value. Enter denomination, counted, reserve.
Use the same whole unit everywhere. For cents, enter 235 for $2.35.
Exact change is available.
Target and reachable alternatives
- Counted value
- 92 units
- Value to keep
- 37 units
- Usable value
- 55 units
30 units
3 minimum · 1 combination
25 units
1 minimum · 1 combination
35 units
2 minimum · 1 combination
Largest-first uses 1 coin and leaves 5 units unfilled.
Each column is one unit. The shaded column is the target. A short gray tick marks an unreachable amount. An outline marks the inspected amount.
Minimum-piece allocation
Target · 30 units using 3 coins
| Value | Use | Left | Keep |
|---|---|---|---|
| 25 | 0 | 2 | 1 |
| 10 | 3 | 0 | 0 |
| 5 | 0 | 2 | 2 |
| 1 | 0 | 2 | 2 |
Left is the remaining count after this allocation. Keep is the reserve entered for that value.
Export the coin change audit
View CSV text
How to use this calculator
- Enter each denomination, counted coins and the minimum number to keep on a separate line.
- Use one whole unit across the worksheet. For cents, enter 235 for an amount of $2.35.
- Check the target and closest reachable alternatives. Select an amount to see the allocation and remaining stock.
- Compare the reachable amounts and download the exact audit.
The Formula
The mathematical logic powering this calculation is:
For each entered denomination d, usable count u equals counted coins minus the reserve. All amounts use the same whole unit, such as cents. The algorithm starts with one way to make zero using zero coins. At the next denomination, extend each reachable previous amount v by q × d for every integer q from 0 through u. Add the previous combination count to the new amount for each extension. For the fewest pieces, minimize the previous minimum plus q over extensions yielding the same amount. Treat equal-valued coins as interchangeable. Each denomination is processed once.
The workspace reconstructs a minimum-piece choice for the target and the closest reachable amounts strictly below and above it. When several allocations use the minimum number of coins, it chooses more of the highest denomination at which they differ. It applies each allocation to the same original stock. The remaining counts always keep at least the specified reserve.
The largest-first comparison separately takes as many usable coins as fit at each denomination, in descending value order. It can leave a gap or use more pieces than the exact calculation. The left-to-right chart shows the minimum pieces for reachable nearby amounts. The table and CSV give counts of distinct combinations. Other reachable amounts can lie outside the chosen chart width.
Enter 1 to 8 distinct denominations from 1 to 1,000 units, with 0 to 40 counted coins per denomination and a reserve at most the counted amount. The target accepts 0 to 5,000 units. The empty allocation is one way to make zero. All feasibility and combination calculations are exact.Worked Example
If you input:
- Stock: Two 25s with one reserved, three 10s available, two 5s and two 1s reserved.
- Target: 30 units
Result:
Three 10s make 30 in the only exact combination. Largest-first uses one 25 and leaves 5 unfilled. The closest other reachable amounts are 25 and 35.
Frequently Asked Questions
Can the drawer contain enough value and still lack exact change?
Yes. The usable coins must sum exactly to the target. The closest smaller and larger totals often show the gap left by the available denominations.
How are combinations different from orders?
A combination counts how many coins of each value are used. Switching the order of those same coins gives the same combination.
Why can largest-first fail?
It takes a large coin before checking whether the remaining denominations can finish the amount. With one usable 25 and three usable 10s, taking 25 toward 30 leaves 5. Three 10s complete the target.
Can I compare reachable alternatives without spending my reserve?
Yes. Every option uses the same entered stock and reserve. The allocation table shows how many coins would remain at each denomination.
Similar Calculators
Cash Register Calculator & Drawer Closeout Worksheet
Reconcile a USD cash register closeout. Compare two bill and coin counts, drawer over or short, retained float and the cash deposit posted for the same session.
Permutation & Combination Calculator
Calculate nPr and nCr values for arranging or selecting items with or without order.
Linear Congruence Calculator & Solution Timeline
Solve one or more linear congruences ax ≡ b (mod m). Find the common residue and period, or see why the congruences conflict.
