How a negative number is written, sign, spacing, parentheses, changes by locale
Aliases: negative number format · accounting negative · negative pattern
What it is
Locale-specific negative-number notation lets a number pattern determine the sign character, position, spacing, and possible use of parentheses or accounting style. A negative value may use a leading or trailing sign or parentheses in financial statements. The stored meaning should remain a signed numeric value, not parentheses, color, or a hyphen encoded as data.
Why it happens
A number formatter applies a negative subpattern together with numbering system, currency sign, and bidirectional-text behavior. In RTL or mixed-direction UI, a sign's visual side is not equivalent to simple prefix or suffix logic. Use the formatter's locale minusSign, including any required bidi marks, rather than replacing or concatenating an ASCII hyphen-minus. Accounting style may use parentheses to align amounts, but color can only be redundant.
Where it stops holding
A negative number is not identical to a decline, loss, or debt. A negative delta, negative balance, and percentage decrease need different labels and baselines. An underlying IEEE negative zero also differs from a nonzero negative rounded to displayed zero. Ordinary finance UI may hide negative zero, add precision, or mark an approximation, while scientific work may preserve directionality; no display policy should rewrite the stored value. Mathematical, programming, or protocol text may instead require fixed ASCII syntax.
Applying it
- Store a signed value and use the target locale and intended decimal, percent, currency, or accounting formatter.
- Supply textual or structured semantics so assistive technology announces “negative” or the business meaning; do not rely only on red color, parentheses position, or visual direction.
- Test underlying negative zero, rounded-to-zero negatives, and tiny negatives separately, with deterministic expectations for formatter sign-display and rounding combinations; then cover currency, percent, RTL, and copying.
- Sort and calculate on raw values. Label exports as localized display or machine data so downstream systems do not infer sign from parentheses or color.
Related
- Same group: S2.02.1 Decimal and grouping separators swap across regions · S2.02.2 Digit groups are not always three digits · S2.02.4 Numeric input must accept local formats
- Adjacent: S2.03 Currency and prices · S2.05 Percentages and ratios
- Search terms:
CLDR negative pattern·accounting number format·localized minus sign