Ordinal Number Formatter

Convert cardinal integers to English ordinal form (1st, 2nd, 3rd, 4th, etc.).

Input

Result

All parameters set. Ready to execute!
Client-Side Privacy
Instant Response
100% Free Forever

Ordinal Number Formatter

The Ordinal Number Formatter is a digital numerical instrument designed to translate cardinal integers into English ordinal formats. Cardinal numbers represent quantity (e.g., 1, 2, 3), whereas ordinal numbers denote position, rank, or order within a defined sequence (e.g., 1st, 2nd, 3rd). This formatter automates the generation of correct suffix designations, ensuring typographic accuracy for rankings, lists, competition standings, and calendar date suffixes. Users input an integer value, and the formatter generates the appropriate ordinal suffix representation instantly.

Understanding English Ordinal Rules

English ordinal suffixes follow a specific grammatical pattern governed by the final digits of the cardinal number. Suffix choices consist of four standard designations: "st", "nd", "rd", and "th". Standard numbers ending in 1 receive "st" (first), those ending in 2 receive "nd" (second), and those ending in 3 receive "rd" (third). Numbers ending in 4 through 9, as well as 0, receive "th" (fourth, fifth, tenth). Suffix exceptions occur for numbers ending in 11, 12, and 13, which receive "th" (eleventh, twelfth, thirteenth) due to their unique phonological structure in English.

There are 4 distinct structural properties that govern the ordinal suffix selection algorithm. First, the algorithm evaluates the number modulo 100 to check for teen exceptions ($11, 12, 13$). Second, if the teen condition is absent, the algorithm evaluates the number modulo 10 to assign the primary suffix. Third, negative integers receive the same suffix mapping as their absolute counterparts, representing negative ranks in mathematics. Fourth, fractional values do not receive standard ordinal suffixes, restricting this tool to integers. This utility implements these exact rules to produce linguistically correct suffixes.

The History of Ordinal Designations

The evolution of ordinal designations is rooted in the development of Germanic languages and early English printing standards. Old English used unique words for orderings, such as *forma* for first and *ōther* for second. During the Middle English period, spelling standards shifted under French influence, adopting the suffix endings we use today. By the 16th century, English printers standardized the superscript and inline suffix formats to distinguish numerical quantities from structural orderings. Modern typographic guidelines recommend inline formatting for standard document text while preserving superscripts for specific legal and academic citations.

How the Ordinal Suffix Algorithm Works

To convert cardinal integers, enter the value and run the program. The processing engine executes the translation through a 3-step sequence.

  1. Input Check: The engine validates that the input value is a whole integer. It rounds decimals to the nearest integer to ensure suffix compatibility.
  2. Suffix Mapping: The engine calculates the remainder of the input divided by 100. If the remainder falls between 11 and 13, it assigns "th". If not, the engine calculates the remainder divided by 10, mapping 1 to "st", 2 to "nd", 3 to "rd", and others to "th".
  3. Result Rendering: The display engine combines the original integer with the mapped suffix to produce the final string.

For example, formatting the cardinal number "123" results in $123 \pmod{100} = 23$ and $23 \pmod{10} = 3$. The tool maps this to "rd" and outputs "123rd". This logic handles arbitrarily large integers, providing consistent outputs for global software applications.

Ordinal Suffix Mapping Reference Table

The table below provides suffix mapping examples across different numerical ranges.

Cardinal Integer Modulo 100 Remainder Modulo 10 Remainder Mapped Suffix Ordinal Output
1 1 1 st 1st
11 11 1 th (Exception) 11th
22 22 2 nd 22nd
113 13 3 th (Exception) 113th
1003 3 3 rd 1003rd

Frequently Asked Questions

Does the formatter support negative numbers?

Yes, the tool formats negative integers by applying the suffix rules to their absolute value. For example, inputting -21 results in the output -21st, which is useful in coordinate geometry and specific ranking systems.

Why are 11, 12, and 13 exceptions to the rule?

The numbers 11, 12, and 13 use the "th" suffix because their English names (eleven, twelve, thirteen) do not end in one, two, or three. The phonetic endings dictate the suffix selection, making them exceptions to the standard modulo-10 rule.

Is the suffix written in superscript or inline?

This formatter outputs inline text, which is the preferred standard for digital accessibility and screen readers. Users can apply custom CSS styles to superscript the suffix in their web applications.

Achieve Typographic Precision Instantly

Manual suffix formatting leads to grammatical errors in dynamic lists and scoreboard rankings. The Ordinal Number Formatter provides reliable, instant formatting. Use this tool to organize competition databases, compile calendar events, and build correct rankings listings accurately.

More Number Tools

Browse All

Arithmetic Sequence Generator

Auto-Incrementing Number List

Prime Number List Generator

Number Format Localizer

Next Prime Finder

LCM Calculator

List of Divisors Generator

BCD Encoder

Happy Number Checker

Perfect Number Checker

Prime Number Checker

Prime Factorization Calculator

Number Digit Counter

Continued Fraction Converter

Number to IEEE 754 Formatter

BCD Decoder

Clamp Number to Range

Number Permutation Counter (nPr)

Factorial Calculator

Amicable Number Checker

Number Palindrome Checker

Fibonacci Number Checker

Armstrong Number Checker

Abundant Number Checker

Number Combination Counter (nCr)

GCD / HCF Calculator

Euler's Totient Calculator

Percentage to Fraction Converter

Percentage to Decimal Converter

Improper Fraction to Mixed Number

Mixed Number to Improper Fraction

Decimal to Fraction Converter

Fraction to Decimal Converter

Convert Number Between Bases

Roman Numerals to Number

Number to Roman Numerals

Engineering Notation Converter

Scientific Notation Converter

Number to Words Converter

Number Formatter