12e5b6d6dSopenharmony_ci--- 22e5b6d6dSopenharmony_cilayout: default 32e5b6d6dSopenharmony_cititle: Formatting Numbers 42e5b6d6dSopenharmony_cinav_order: 1 52e5b6d6dSopenharmony_ciparent: Formatting 62e5b6d6dSopenharmony_cihas_children: true 72e5b6d6dSopenharmony_ci--- 82e5b6d6dSopenharmony_ci<!-- 92e5b6d6dSopenharmony_ci© 2020 and later: Unicode, Inc. and others. 102e5b6d6dSopenharmony_ciLicense & terms of use: http://www.unicode.org/copyright.html 112e5b6d6dSopenharmony_ci--> 122e5b6d6dSopenharmony_ci 132e5b6d6dSopenharmony_ci# Formatting Numbers 142e5b6d6dSopenharmony_ci 152e5b6d6dSopenharmony_ciSince ICU 60, the recommended mechanism for formatting numbers is 162e5b6d6dSopenharmony_ci[`NumberFormatter`](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/numberformatter_8h.html#details) 172e5b6d6dSopenharmony_ci([Java](https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/number/NumberFormatter.html)). `NumberFormatter` supports the formatting of: 182e5b6d6dSopenharmony_ci 192e5b6d6dSopenharmony_ci- Decimal Formatting 202e5b6d6dSopenharmony_ci- Currencies 212e5b6d6dSopenharmony_ci- Measurement Units 222e5b6d6dSopenharmony_ci- Percentages 232e5b6d6dSopenharmony_ci- Scientific Notation 242e5b6d6dSopenharmony_ci- Compact Notation 252e5b6d6dSopenharmony_ci 262e5b6d6dSopenharmony_ciFor number ranges, including currency and measurement unit ranges, see [`NumberRangeFormatter`](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/numberrangeformatter_8h.html) ([Java](https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/number/NumberRangeFormatter.html)). 272e5b6d6dSopenharmony_ci 282e5b6d6dSopenharmony_ciFor rule-based number formatting, including spellout rules and support for traditional numbering systems not covered by base-10 decimal digits, see [rbnf.md](rbnf.md). 292e5b6d6dSopenharmony_ci 302e5b6d6dSopenharmony_ciFor the classic `NumberFormat` class, which also includes legacy parsing support for localized number strings, see [legacy-numberformat.md](legacy-numberformat.md). 31