<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5HGSQD2L" height="0" width="0" style="display:none;visibility:hidden" title="GTM"></iframe>

Numbers

Definition

Numbers represent quantitative information in user interfaces and content. They communicate measurements, counts, sequences, ranges and monetary values to help users understand quantities and make informed decisions.

Overview

Localization

Our source language is EN-US (US English). Remember to hand off designs to the Localization team.

Engineering notes

  • Use the Intl browser API for localization. This will automatically localize numbers into the correct format.
  • Where manually-created EN-US content needs to be formatted correctly in the code, use the relevant guidelines shown in this documentation
  • Below is an example of using the Intl API:

The preview has been updated.

Structure

General numbers

  • For most numbers, we recommend writing them out with digits rather than words, as they are easier to scan
  • However, there are some instances when writing numbers with words may be preferable:
    • Numbers that are part of a proper noun
    • Ordinal numbers ("third" instead of "3rd")
    • Any time writing out the number would improve overall clarity
  • When a number has 4 or more digits, use commas between every group of 3 digits starting from the right (β€œ4,000” instead of β€œ4000”)
  • Don't use abbreviations like 130k or 130K. We shouldn’t assume that all audiences will understand these
  • For large, whole numbers only, use a mix of digits and words to improve readability (β€œ3 million” instead of β€œ3,000,000”)

Instead of


  • 15k
  • 40000
  • 16,000,000
  • Coca-Cola 0 Sugar
  • 1st choice
  • 2-factor authentication
  • 1-time offer

Use


  • 15,000
  • 40,000
  • 16 million
  • Coca-Cola Zero Sugar
  • First choice
  • Two-factor authentication
  • One-time offer

Number ranges

The preview has been updated.

  • Use an en dash "–" between numbers with no spaces before or after
    • Tip: On a Mac, use Option+ Hyphen (-) to create an en dash
  • Use "and up" or "up to" for ranges above or below a number

Instead of


  • 1 to 9
  • Less than 1,000

Use


  • 1–9
  • Up to 1,000

Decimals

The preview has been updated.

  • Display decimals without rounding up or down
  • Don't use fractions
  • Insert a zero before the decimal point if the amount is less than one
  • Drop the decimal point if the decimal equals zero
  • For monetary amounts, reference Currency

Instead of


  • 26 1/2
  • .54
  • 99.00

Use


  • 26.5
  • 0.54
  • 99

Percentages

The preview has been updated.

  • Format as [value][percent symbol] with no space between the number and symbol
  • Use the % symbol. Don't spell out "percent”

Instead of


  • 6.5 %
  • 20 percent

Use


  • 6.5%
  • 20%