S2.03.2Currency fraction digitsdesign

Fraction digits vary by currency

Aliases: currency decimal places · minor currency unit · cash rounding

What it is

Currency fraction digits are the default display precision selected by currency rather than by locale. Two decimals are common but not universal: some currencies conventionally display none, others display three, and cash payment can use a separate digit count or rounding increment. Fraction digits carry monetary meaning; available screen width or the incidental scale of an input number should not choose them.

Why it happens

Unicode LDML supplemental currency data records digits and rounding, with cashDigits and cashRounding for cash quantities. Although a currency pattern commonly contains two decimal placeholders, currency data or an explicit API option overrides that visible count. Japanese yen conventionally formats with zero fraction digits and Bahraini dinar with three. Swiss francs retain two accounting digits while a cash total can be rounded in 0.05-franc increments. Rounding line items, tax, and totals at different stages can also make displayed components fail to add up to the payable amount.

Where it stops holding

Display precision is not calculation precision or storage precision. Foreign-exchange calculations, interest allocation, cryptoassets, and internal pricing may need scales beyond a legal minor unit; the eventual charge, invoice, or cash handover follows the payment rail and business rules. Historical currencies and data revisions make permanent hard-coding brittle. Trailing zeros can communicate payable precision, while a compact market quote may intentionally suppress them, so one context-free formatter cannot serve both faithfully.

Applying it

  • Store money as fixed-point decimals or integers in an explicitly named minor unit, and carry currency, rounding mode, and calculation scale with it. Do not accumulate financial amounts in binary floating point.
  • Take default digits and cash increments from maintained CLDR/ICU currency data. Version explicit overrides required by payment processors, accounting policy, or applicable rules instead of scattering a literal 2 across components.
  • Separate calculation scale, ledger presentation, and cash-payable policies. Define exactly where item, discount, tax, and total rounding occurs so the result remains reconcilable.
  • Build tests for zero-, two-, and three-digit currencies, cash increments, negatives, half-way boundaries, and bulk summation. Re-run golden examples and review invoices when CLDR or business rules change.

Related

  • Same group: S2.03.1 Currency-symbol placement and spacing vary by locale · S2.03.3 Currency conversions need a rate timestamp and source · S2.03.4 Tax-inclusive and tax-exclusive display practices differ
  • Adjacent: S2.02.1 Decimal and grouping separators swap across regions · S2.04.2 Unit-conversion rounding can create inconsistencies
  • Search terms: currency fraction digits · minor currency unit · cash rounding

Cards in the same group

Quick Actions

Share

Share this page

ios_share

https://hci.top/en/handbook/S2.03.2