As developers, we write numbers in words more often than we realize. Release notes say "second major release," error messages say "the first argument must be a string," and our UI copy announces "you came in third place." Yet the difference between cardinal and ordinal numbers trips up even experienced writers. Let's clear it up.
Cardinal numbers: counting things
Cardinal numbers answer the question "how many?" — one, two, three, twelve, forty-seven, two hundred and thirteen. They tell you quantity. Arrays have lengths, queues have sizes, and APIs return counts: all of those are cardinals.
The function accepts three arguments.
There are 12 pending jobs in the queue.
Ordinal numbers: ordering things
Ordinal numbers answer the question "in what position?" — first, second, third, twelfth, forty-seventh, two hundred and thirteenth. They describe rank or sequence. Think leaderboards, sorting, pagination, race results, and version histories.
This is the first public beta.
She finished twenty-third out of five hundred runners.
The conversion rules
Most ordinals are formed by adding -th to the cardinal word: four → fourth, nine → ninth, twenty → twentieth. But watch the irregulars:
- one → first
- two → second
- three → third
- five → fifth
- eight → eighth
- nine → ninth (drop the "e")
- twelve → twelfth ("ve" becomes "f")
For compound numbers, only the last part becomes ordinal: "thirty-one" → "thirty-first," "one hundred and two" → "one hundred and second." Fractions of this get missed in documentation all the time.
Abbreviated ordinals: 1st, 2nd, 3rd
In technical writing you'll also see abbreviated forms. The general pattern: use the last two letters of the full word — fir*st, second, third, fourth* — with the exceptions of 11th, 12th, and 13th, which all take "th" (eleventh, twelfth, thirteenth). That's why "the 21st century" works but "21th" would be wrong, while "the 13th of October" is right and "13rd" would be wrong.
Cardinal or ordinal? A quick decision guide
Ask yourself which question the number answers:
- How many? → cardinal: "The endpoint returned five results."
- Which position? → ordinal: "Use the fifth result."
- Which version in a series? → ordinal: "Upgrade to the third release."
- A measurement or count? → cardinal: "Retry after ten seconds."
A common mistake in UI copy: "You are number 3 in line" is fine in casual products, but "You are third in line" reads more naturally and professionally. Another: writing "the 1st argument" in documentation. Spelled-out ordinals ("the first argument") look better in prose; digits with suffixes ("step 3 of 7") suit tables, wizards, and compact UI labels.
Consistency matters more than perfection
Whatever conventions you choose for a codebase or docs site, apply them everywhere: dates, versions, error messages, and changelog entries. Users notice inconsistency — "Step 1st of 5" next to "Step third of 5" in the same wizard erodes trust faster than any single mistake.
Keep a reference handy
When you're drafting release notes, user-facing copy, or that README example at 2 a.m., it's faster to check than to guess. A free numbers-to-words converter can quickly confirm spellings before you ship.
Get the cardinals and ordinals right, and your writing — code, docs, and product copy alike — will read with the same precision as the software behind it.
Top comments (0)