Cash denomination calculator
This cash denomination calculator finds an exact way to build a total from the bills and coins you actually have available.
Run — free
It minimizes the number of physical pieces rather than assuming a particular national currency or relying on the usual greedy change-making shortcut. Enter the amount and denomination values, including decimal coin values when needed. The result lists every supplied denomination with its required count, reports the total number of pieces, and clearly rejects totals that cannot be made exactly.
Enter the amount and the denominations you can use
Start with the total cash amount you need to assemble, then provide the available bill and coin values. The calculator is currency-neutral: values such as 20, 10, 5, 1, 0.25, and 0.10 work for a decimal currency, while a different set can represent vouchers, tokens, or a cash drawer with selected denominations missing. Amounts and denominations may use up to two decimal places, which keeps the calculation exact in the smallest cash unit rather than allowing floating-point drift. Each denomination must be positive and unique. The output sorts the supplied denominations from highest to lowest and includes a count for every one, including zero when a particular value is not needed. This makes the result straightforward to copy into a till sheet, packing list, withdrawal plan, or reconciliation record. The calculator assumes an unlimited supply of every listed denomination; the list describes which values exist, not how many individual pieces are currently in stock.
Why the result really uses the minimum number of pieces
Many everyday cash systems appear to support a simple rule: repeatedly take the largest denomination that does not exceed the remaining amount. That greedy shortcut is fast, but it is not correct for every denomination set. For example, unusual tokens, event coupons, foreign coins, or a drawer missing common values can make a smaller-first combination use fewer pieces than the greedy choice. This calculator uses dynamic programming instead. It evaluates reachable subtotals and records the smallest piece count that can produce each one, then reconstructs an exact combination for the requested total. Because all values are converted to integer minor units before calculation, comparisons are exact for the supported two-decimal inputs. If several combinations use the same minimum count, the deterministic search order favors larger denominations first, so repeated calls with the same input return the same breakdown. The computation is bounded to protect browser and API responsiveness; exceptionally fine denominations paired with a very large total may exceed the published normalized-work limit and will be rejected instead of running without a practical bound.
Understand exact-match failures and use the result safely
An exact result does not always exist. If every available denomination is a multiple of five cents, for instance, an amount ending in three cents cannot be assembled no matter how many pieces are used. The calculator reports that condition as an input error rather than returning a nearby amount, silently rounding the total, or inventing a denomination. That distinction matters in cash reconciliation, prepared change packs, and controlled payouts, where being slightly short or over is still wrong. A successful result returns the normalized amount, the minimum total number of pieces, and a denomination-by-denomination breakdown. Counts of zero remain visible so the output reflects the complete supplied set and can be aligned with an inventory form. Before acting on the plan, remember that the algorithm treats the supply of each denomination as unlimited. If your drawer has limited quantities, compare the proposed counts with the stock on hand; this capability does not solve the separate bounded-inventory problem. The same deterministic calculation runs in the browser for interactive use and through the API for automation at $0.002 per request.
What you can do with it
Prepare cash payout envelopes
Turn each exact payout total into a minimum-piece packing list using the denominations approved for distribution.
Plan a cash drawer refill
Find a compact denomination mix for a target amount when only selected bill and coin values are used.
Allocate vouchers or event tokens
Use a custom nonstandard denomination set and detect totals that the available token values cannot represent exactly.
FAQ
Does this always find the fewest bills and coins?
Yes. It examines reachable subtotals with dynamic programming and returns an exact combination with the minimum total piece count.
Can I use decimal coin denominations?
Yes. The amount and denomination values may have up to two decimal places, such as 0.25 or 0.05.
What happens if the amount cannot be made exactly?
The request returns an invalid-input error explaining that the supplied denominations cannot make the amount exactly. It never rounds to a nearby total.
Does the calculator consider limited quantities in my drawer?
No. Every listed denomination is treated as having an unlimited supply. Counts in stock are not part of this capability.
Why might the answer differ from taking the largest denomination first?
The largest-first greedy method can be suboptimal for custom denomination systems. This calculator tests combinations and guarantees a minimum-piece result.
What does an API request cost?
Each API request costs $0.002. The same deterministic calculator is available free in the browser.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/travel2/currency-cash-denomination-split \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"amount":18.85,"denominations":[10,5,2,1,0.25,0.1,0.05]}'const res = await fetch("https://api.kit.forhosting.com/travel2/currency-cash-denomination-split", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"amount": 18.85,
"denominations": [
10,
5,
2,
1,
0.25,
0.1,
0.05
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/travel2/currency-cash-denomination-split",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"amount": 18.85,
"denominations": [
10,
5,
2,
1,
0.25,
0.1,
0.05
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/travel2/currency-cash-denomination-split", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"amount":18.85,"denominations":[10,5,2,1,0.25,0.1,0.05]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"amount":18.85,"denominations":[10,5,2,1,0.25,0.1,0.05]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/travel2/currency-cash-denomination-split", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"amount": 18.85,
"denominations": [
10,
5,
2,
1,
0.25,
0.1,
0.05
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "travel2.currency_cash_denomination_split",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_denominations | 100 |
max_normalized_amount | 250000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |