ForHosting KIT · Developer Utilities

Cash change due calculator

The cash change due calculator finds exactly how much money a customer should receive after paying for a purchase.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Enter the final purchase total and the cash amount tendered, using the same currency for both values. The calculator subtracts the total from the tendered amount with exact two-decimal arithmetic, avoiding familiar floating-point surprises. It is useful at a register, market stall, school event, cash office, or anywhere a quick and auditable cash-transaction result is needed.

Enter the two amounts from the transaction

Start with the final purchase total after taxes, discounts, coupons, deposits, or other adjustments have already been applied. Then enter the amount of cash the customer actually handed over. Both values must use the same currency and may contain no more than two decimal places. For example, if a sale costs 13.47 and the customer gives you 20.00, enter those values as the purchase total and amount tendered. Do not enter a card authorization, gift-card balance, or the value of a mixed payment unless the cash amount alone is intended to cover the full total shown. The calculator accepts zero as a valid amount, which is helpful for a fully discounted transaction, but neither amount can be negative. It also accepts clear field aliases through the API, although using amount_tendered and purchase_total makes records easiest to understand later. Review the receipt before calculating: an accurate subtraction cannot correct a total that omitted tax or included the wrong item. Keeping the two inputs explicit makes the result easy for a cashier, customer, or auditor to reproduce.

Understand how change due is calculated

The rule is change due equals amount tendered minus purchase total. Although that formula is simple, money deserves careful decimal handling. This calculator converts each entered amount into an integer count of hundredths before subtracting, then converts the result back for display. Consequently, values such as 20.00 and 13.47 produce 6.53 without binary floating-point noise. The response includes the normalized tendered amount, normalized purchase total, numeric change_due, a change_due_formatted string that always displays two decimal places, and the formula used. A result of 0.00 means the customer paid the exact amount and no cash should be returned. If the tendered amount is below the total, the transaction has a shortfall rather than change; the calculator rejects that input and reports how much is missing. This distinction prevents a negative number from being mistaken for money that should be handed back. The tool does not choose notes and coins because denominations depend on the currency, location, and cash drawer. Its job is the universal arithmetic amount owed to the customer.

Use the result safely at a cash register

Read the formatted change amount aloud, keep the tendered cash visible, and count the returned money back to the customer before placing the original payment in the drawer. A common counting method starts at the purchase total and adds coins and notes until reaching the tendered amount; the calculated change provides an independent target for that process. For a 13.47 purchase paid with 20.00, the target is 6.53, regardless of which available denominations make up that amount. When integrating the API into a point-of-sale workflow, store the two inputs and returned result together so later reconciliation can show exactly what was calculated. Each request costs $0.002; the browser calculator can be used for an immediate manual check. The calculation is deterministic, uses no network lookup, and does not infer currency symbols or exchange rates. Always follow local cash-rounding rules where the smallest circulating coin is larger than one hundredth of the currency unit. In those jurisdictions, apply the legally required rounding to the purchase total before submitting it, then use this result as the change target.

Check change at a retail register

Confirm the amount to return when a customer pays a final receipt total with cash.

Run a temporary cash desk

Give volunteers at a fundraiser, market, or school event a consistent way to calculate change.

Automate a point-of-sale calculation

Call the API with tendered cash and the sale total, then record the deterministic result for reconciliation.

What formula does the calculator use?

It uses change_due = amount_tendered - purchase_total after converting both amounts to integer hundredths.

What happens if the customer did not tender enough cash?

The request returns an invalid-input error stating the shortfall, because an underpayment is not change due.

Can I use any currency?

Yes, if both inputs use the same currency and that currency is represented with two decimal places. The result intentionally has no currency symbol.

Does it tell me which notes and coins to return?

No. It calculates the total change owed; denomination selection varies by currency and the contents of the cash drawer.

How much does an API calculation cost?

Each API request costs $0.002. You can also run the calculator in the browser for a manual check.

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.

POSThttps://api.kit.forhosting.com/life/change-due

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.

curl -X POST https://api.kit.forhosting.com/life/change-due \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount_tendered":20,"purchase_total":13.47}'
{
  "amount_tendered": 20,
  "purchase_total": 13.47
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "life.change_due",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →