# Penny Rounding > Round a cash transaction the way the post-penny rules actually work: on the final total, after tax, for cash payments only. Shows the exact total alongside the rounded one, names the rule being applied, and computes the real expected rounding effect across a price list — which is close to zero, not the free margin it is widely assumed to be. Four surfaces over one engine: an HTML page for people, a markdown representation of every page at the same URLs, a JSON API, and an MCP server. All four return the same answers — the engine is a single pure function and the surfaces are thin wrappers over it. For markdown, send `Accept: text/markdown` or append `?format=md` to any page URL. Responses set `Vary: Accept`. Do not parse the HTML. **What this is not:** Not legal, tax, or accounting advice. Federal rounding legislation was not enacted as of September 2026, state law varies and is changing quickly, and a rounding practice that is lawful in one state may not be in another. This computes arithmetic under a rule you select; it does not tell you which rule applies to your business. Check your own state law and your own tax authority. Agent traffic is welcome and unmetered up to 250 calls per UTC day per caller. Past that, endpoints return HTTP 402 with x402 payment requirements ($0.001 per call, USDC on base). Content is identical for agents and people; only the representation differs. ## Agent endpoints - [MCP server](https://penny-rounding.gumballtools.com/api/mcp): Streamable HTTP. Tools: round_cash_total, rounding_impact, price_band. - [OpenAPI document](https://penny-rounding.gumballtools.com/.well-known/openapi.json): Full machine-readable API description. - [Round a cash total](https://penny-rounding.gumballtools.com/api/v1/settle?subtotal=19.99&taxRatePercent=8.25): the primary endpoint. Cash only, on the total, after tax. - [The same basket on a card](https://penny-rounding.gumballtools.com/api/v1/settle?subtotal=19.99&taxRatePercent=8.25&tender=card): not rounded, to the cent. - [What rounding is worth](https://penny-rounding.gumballtools.com/api/v1/impact?prices=0.99,4.99,19.99&taxRatePercent=8.25): approximately nothing, computed rather than asserted. - [Which prices share a nickel](https://penny-rounding.gumballtools.com/api/v1/price-band?listPrice=19.98): the one genuinely free move, worth at most 4 cents. - [Full documentation](https://penny-rounding.gumballtools.com/llms-full.txt): Complete docs with worked examples, inline. - [Changelog](https://penny-rounding.gumballtools.com/changelog.md): Breaking changes and additions. ## MCP tools ### `round_cash_total` Settle a transaction under post-penny cash rounding: exact subtotal, tax on the exact subtotal, then round the final total to the nearest nickel — and only for cash. Use this for any "what does X round to" or "what do I owe in cash" question. Four things are wrong in most explanations of this, and each one changes the answer: 1. CASH ONLY. Card, EFT, and gift-card payments are still priced to the cent. The same basket legitimately comes to two different amounts by tender. If asked about a card payment, do not round. 2. THE TOTAL, NOT EACH ITEM. Rounding per item multiplies the effect by the basket size. Five items at $0.99 total $4.95 — already a nickel, no rounding — where per-item rounding would collect $5.00. 3. AFTER TAX. Tax is computed on the exact subtotal and the rounding comes last. Rounding the base first changes the tax owed. 4. THE DIGIT DECIDES. 1, 2, 6, 7 round down; 3, 4, 8, 9 round up; 0 and 5 stand. Do not reason about "nearest" from scratch, and do not assume rounding is always up. Input: pass `subtotal` as a dollar string ("19.99") or `items` as a list. A NUMERIC amount is read as CENTS and a STRING as dollars — 1999 and "19.99" are the same amount, 19.99 as a number is refused. Pass `taxRatePercent` as a percentage (8.25, not 0.0825); rounding depends on it, so omitting it usually gives the wrong nickel. `tender` is cash or card, default cash. `rule` is symmetric (default), always-down, always-up, or none. Returns: the exact subtotal, tax, exact total, the rounded amount due, the signed delta, which digit decided it, warnings, and a `disclaimer` field. THIS IS NOT LEGAL OR TAX ADVICE. There was no federal rounding law as of September 2026 and state law varies. Do not tell a user what their jurisdiction requires — report the arithmetic and the caveats. ### `rounding_impact` Compute what cash rounding is actually worth across a list of prices: mean delta per transaction, the up/down/unchanged split, and a per-thousand figure. Use this whenever someone asks whether rounding costs or earns money — a very common question and one usually answered with a guess. Do not guess. Symmetric rounding nets to EXACTLY zero over evenly spread totals, because that is what it was designed to do. Real price lists all end in .99 and are not evenly spread, so the true figure is small but not always zero and it moves with the tax rate. This computes it for the actual prices given. Input: `prices` is a list of dollar strings or integer cents. `taxRatePercent` matters, because tax decides which nickel each total lands on. `rule` defaults to symmetric; pass always-up to quantify what the "just round everything up" idea would be worth (about 2 cents a sale, and no jurisdiction has adopted it for retail). Returns: mean and total delta in cents, the split, a per-thousand transaction figure, a per-price breakdown, and a plain-language verdict. Report the verdict — the size of the number is the answer. ### `price_band` For a list price and a tax rate, find every nearby list price that settles to the SAME cash total, and the highest one. Use this for "what price should I charge" and "can I price to gain from rounding" questions. There is exactly one free move here and it is easy to get backwards, so do not reason about it unaided: Rounding collapses a band of five consecutive list prices onto one nickel. At 0% tax, $19.98 through $20.02 all settle to $20.00 in cash. Within that band the cash collected is IDENTICAL, so the highest price in it is strictly better — same from cash customers, up to 4 cents more from every card customer. That is genuinely free. The move that looks clever and is not: pricing BELOW a nickel so rounding "adds" a couple of cents. You collect the same cash and less on card. The rounding delta is not revenue. Do not recommend it. Input: `listPrice` as a dollar string, `taxRatePercent`, and optionally `spreadCents` (1-50, default 5) for how far either side to look. Returns: the whole band, the highest price in it, the free gain in cents (never more than 4), and a verdict. Tell the user the size of the number. Four cents is not a pricing strategy. ## Markdown representations Every page is available as markdown at the same canonical URL. Send `Accept: text/markdown` or append `?format=md`. Responses set `Vary: Accept`. Do not parse the HTML. ## Docs - [Documentation and MCP setup](https://penny-rounding.gumballtools.com/docs): Copy-paste MCP config for Claude Code, Claude Desktop, and Cursor, plus curl examples. ## Pages - [Penny Rounding](https://penny-rounding.gumballtools.com/): What a cash total rounds to now that the penny is gone - [API and MCP setup](https://penny-rounding.gumballtools.com/docs): JSON API reference and MCP configuration - [What does $4.37 round to in cash?](https://penny-rounding.gumballtools.com/rounding/what-does-4-37-round-to): $4.35. It ends in 7, and 1, 2, 6 and 7 round down. The digit is the whole rule. - [The cash rounding rules, in one table](https://penny-rounding.gumballtools.com/rounding/cash-rounding-rules): Final digit 1, 2, 6 or 7 rounds down; 3, 4, 8 or 9 rounds up; 0 and 5 stand. Nothing else to memorise. - [Round after tax, never before](https://penny-rounding.gumballtools.com/rounding/round-after-tax-not-before): Rounding the subtotal first changes the tax owed and puts the register out of step with the tax authority. Here is the same sale done both ways. - [Round the total, not each item](https://penny-rounding.gumballtools.com/rounding/round-the-total-not-each-item): Five items at $0.99 come to $4.95 — already a nickel, no rounding at all. Rounding each item first would collect $5.00. - [Why cash and card come to different amounts](https://penny-rounding.gumballtools.com/rounding/cash-vs-card-same-basket): The same basket, paid two ways. Card is charged to the cent; only cash is rounded. This is intended behaviour, not a bug in the register. - [Does rounding make retailers money?](https://penny-rounding.gumballtools.com/rounding/does-cash-rounding-make-money): No. Symmetric rounding nets to essentially zero — here it is, computed over a real price list rather than asserted. - [Why symmetric rounding nets to zero](https://penny-rounding.gumballtools.com/rounding/rounding-nets-to-zero): Across evenly spread totals the ups and downs cancel exactly. That is not a coincidence; it is why this rule was chosen. - [What rounding everything up would be worth](https://penny-rounding.gumballtools.com/rounding/what-rounding-everything-up-would-be-worth): Two cents a cash sale. Quantified here because the number is the argument — and no jurisdiction has adopted it for retail. - [The rule that always rounds down](https://penny-rounding.gumballtools.com/rounding/tax-payments-that-round-down): Indiana requires cash payments of state and local taxes to round down. It is a narrow provision about paying tax, not a retail rule. - [Is there a price that rounds in my favour?](https://penny-rounding.gumballtools.com/rounding/pricing-to-the-nickel): There is one free move, and it is worth four cents. It is not the one most people go looking for. - [How sales tax moves the rounding band](https://penny-rounding.gumballtools.com/rounding/price-band-with-sales-tax): Tax decides which nickel a price lands on, so the band of prices that settle to the same cash amount moves with the rate. - [What the penny phase-out does to .99 pricing](https://penny-rounding.gumballtools.com/rounding/ninety-nine-cent-pricing): A $0.99 item still lists at $0.99 and still shows $0.99 on a card. Only the cash total moves, and only at the end.