Spell out all ordinal numbers in text.
Not recommended: 1st, 5th, 12th, 43rd
Recommended: first, fifth, twelfth, forty-third
Numbers as words
In general, spell out the following:
- Numbers from zero through nine.
A number that starts a sentence.
Recommended: Fifteen directories are created.
In some cases it's better to rearrange the sentence so that the number appears later.
Not recommended: 164MB is generally considered too large a file to send as an attachment.
Recommended: In general, avoid sending files larger than 164MB as attachments.
Exception: It's okay, but non-optimal, to begin a sentence with a four-digit year.
A number that is followed by a numeral.
Recommended: This procedure creates fifteen 100,000-byte files.
Recommended: This procedure creates 15 of the 100,000-byte files.
Numbers as numerals
In general, use numerals for the following:
Numbers 10 and greater.
Exceptions: Always use numerals for the following items, even if they're less than 10:
- Version numbers.
- Technical quantities, such as amounts of memory, amounts of disk space, numbers of queries, or usage limits.
- Page numbers.
- Chapter numbers, sections, pages, and so on.
- Numbers without units, such as numbers used in mathematical expressions.
Numbers less than 10 when they appear in the same sentence with numbers greater than 9.
Recommended: The menu contains 15 options but 6 of them are disabled.
- Negative numbers.
- Most fractions.
For decimal numbers less than one, place a zero in front of the decimal point.
Recommended: 0.3 inch
- Numbers in a range.
- Express fractions as decimal numbers, when possible.
When expressing fractions as words, connect the numerator and denominator with a hyphen unless one of them is already hyphenated.
Recommended: five sixty-fourths
In general, use numerals and the percent sign (%), without a space between them.
Exception: If the percentage starts the sentence, then spell out both the number and the word percent.
Recommended: Forty percent of the files
Ranges of numbers
Use numerals for ranges.
In theory, the correct punctuation for a range of numbers is an en dash. But in practice, for simplicity we use a hyphen with no space either side of it.
See also the Hyphens page.
- two-day total
- version 3
- four options
- five minutes
- 6 queries/second
- 8 pixels
- nine developers
- 10 chapters
- 18 years old
- 27 minutes
- 102 degrees
- 728 shipments
- 18,000,000 users
Commas and decimal points in numbers
Use commas and decimal points in accordance with standard American number-formatting.
Specifically: in numbers four or more digits long, use commas to set off groups of three digits, counting leftward from the decimal point, in the standard American style.
Use a period for a decimal point, also in the standard American style.
Examples of comma grouping
Not recommended: The limit is 1532784 bytes per day.
Recommended: The limit is 1,532,784 bytes per day.
Not recommended: The API supports up to 2000 vertices.
Recommended: The API supports up to 2,000 vertices.
For more about decimal points and digit group separators, see Wikipedia's decimal mark entry.