The 8% reduced rate is where tax math goes wrong: consumption_tax_from_exclusive keeps the rates separate

Japan has two consumption tax rates: 10% standard and 8% reduced (most food and beverages). Applying 10% to a reduced-rate amount, or rounding per item instead of per rate group on a qualified invoice, produces totals that do not match the invoice rules.

Verified outputs (run on 2026-11-29)

consumption_tax_from_exclusive(10000, "standard")
{"amount_exclusive": 10000, "rate": "standard", "rate_percent": 10, "rounding": "floor", "tax": 1000, "amount_inclusive": 11000}

consumption_tax_from_exclusive(1080, "reduced")
{"amount_exclusive": 1080, "rate": "reduced", "rate_percent": 8, "rounding": "floor", "tax": 86, "amount_inclusive": 1166}

How to use it

Call consumption_tax_from_exclusive with an integer yen amount, a rate (standard or reduced) and a rounding mode (floor, round or ceil).

Use consumption_tax_from_exclusive on MCPize

All Japan tool pages