FreeToGenerate.com

English has the fewest plural forms of these five languages and the most ordinal ones. Arabic is the exact reverse. Nothing is uploaded.

Try

Try 0 — three of these five languages disagree with English about it. Then try 1000000.

What your browser says

EnglishotherThe fallback. Every language has it, and some languages have only it.
SpanishotherThe fallback. Every language has it, and some languages have only it.
PortugueseoneThe singular — though which numbers count as singular is not the same everywhere.
FrenchoneThe singular — though which numbers count as singular is not the same everywhere.
ArabiczeroA form used for nothing at all, which most languages do not have.

Computed here, now, by your own browser. That is the only answer that can affect your code.

fromto

The part of the API almost nobody knows exists. In English a range from 1 to 1 is not singular.

The same question about a range

Englishother
Spanishother
Portugueseone
Frenchone
Arabicother

Every category each language uses

Englishcounting (one file, two files)oneother2 categories
ordering (1st, 2nd, 3rd)onetwofewother4 categories
Spanishcounting (one file, two files)onemanyother3 categories
ordering (1st, 2nd, 3rd)other1 categories
Portuguesecounting (one file, two files)onemanyother3 categories
ordering (1st, 2nd, 3rd)other1 categories
Frenchcounting (one file, two files)onemanyother3 categories
ordering (1st, 2nd, 3rd)oneother2 categories
Arabiccounting (one file, two files)zeroonetwofewmanyother6 categories
ordering (1st, 2nd, 3rd)other1 categories

These tables were computed when the page was built. If they disagree with the box above, your browser has different CLDR data — which is itself worth knowing.

Which numbers land in which category

English
one1
other0, 2, 3, 4
Spanish
one1
many1,000,000, 2,000,000, 10,000,000, 1,000,000,000
other0, 2, 3, 4
Portuguese
one0, 1, 0.5, 1.5
many1,000,000, 2,000,000, 10,000,000, 1,000,000,000
other2, 3, 4, 5
French
one0, 1, 0.5, 1.5
many1,000,000, 2,000,000, 10,000,000, 1,000,000,000
other2, 3, 4, 5
Arabic
zero0
one1
two2
few3, 4, 5, 6
many11, 12, 13, 14
other100, 101, 102, 200

Also available in: Español · Português · Français · العربية

CLDR plural rules

Shows which plural category any number falls into, in five languages at once, using the same data your browser uses.

What are plural rules?

If you have ever written “1 file(s) deleted”, you have met the problem these rules solve. English needs two forms — file and files — and the naive fix is a check for whether the count is one. That fix breaks the moment the interface is translated, because languages do not agree on how many forms there are or on which numbers get which.

CLDR, the Unicode Common Locale Data Repository, settles it by giving every language a set of named categories drawn from six possibilities: zero, one, two, few, many and other. A language uses as many of them as it needs. Your code writes one message per category, and the runtime picks. Every browser exposes this through Intl.PluralRules, so there is nothing to download and nothing to maintain.

The tool above asks that question of five languages at once. Type a number and each says which category it falls into — and the interesting part is how often they disagree, including on numbers you would not expect to be contentious.

How to use it

  1. Type a number and read across. Each language reports the category that number lands in. Start with 0: English and Spanish call it plural, French and Portuguese call it singular, and Arabic gives it a form of its own. Three of five disagree with English about nothing at all.
  2. Switch between counting and ordering. Cardinal is one file, two files. Ordinal is 1st, 2nd, 3rd. They are different rule sets with different category counts, and swapping the toggle is the fastest way to see how differently the same language treats them.
  3. Try a range. The second control uses selectRange, which almost nobody knows exists — it answers what form “1–2 items” takes. In English a range from 1 to 1 is not singular, which surprises most people who guess.

The reversal: English is the complicated one

The received idea is that English plurals are simple and other languages are hard. For counting, that is right: English uses two categories where Arabic uses all six. Arabic has a form for zero, a form for one, a distinct dual for exactly two, a form for three to ten, another for eleven to ninety-nine, and a fallback. It is even modular — 103 takes the same form as 3, and 111 takes the same form as 11.

For ordering, it inverts completely. English needs four ordinal forms, because 1st, 2nd and 3rd each take a different suffix and everything else takes -th — with the teens as the exception that no rule about the last digit alone can express, which is why 21st is “one” and 11th is “other”. Arabic needs exactly one ordinal form. So does Spanish, and so does Portuguese; French needs two.

Put the two together and English is the only one of these five languages with more ordinal categories than plural ones. The language people call simple is, on this axis, the most demanding of the group — and any code that hard-codes an English ordinal suffix by looking at the last digit will get the teens wrong.

There is one more oddity worth typing in. Spanish, Portuguese and French each have a third category that fires on exact multiples of a million and nowhere else. 999,999 is ordinary, 1,000,000 takes a special form, and 1,000,001 is ordinary again.

Honest limits

A plural category is not a translation. Knowing that a number falls into “few” tells you which message slot to use; it does not write the message. The rules are about grammar agreement, and the words are still yours.

The categories are also not the whole of agreement. Many languages inflect for case and gender as well, and a count can change more than the noun's ending — Arabic in particular changes the noun's form and its case with the number. CLDR's categories cover the part a message-formatting library can automate, which is real but partial.

The tables lower down were computed when this page was built; the box at the top uses your browser as you read. Both draw on CLDR, but a browser and a build server can carry different versions of it, and CLDR does revise rules. If the two ever disagree on your screen, the box is right for you and the disagreement is itself the useful information — which is why the page shows both rather than picking one.

One thing the JavaScript API genuinely cannot express: CLDR distinguishes 1 from 1.0, because a language may treat “1.0 metres” as plural where “1 metre” is singular. In JavaScript those are the same number, so passing 1.0 gives you the answer for 1. To get the other answer you have to format the value as a string first and let the formatting carry the decimal.

Finally, this page compares the five languages the site is published in. Intl.PluralRules knows hundreds more, and some of them behave in ways none of these five illustrate — a language may have a category no whole number ever reaches, so no amount of counting upward would reveal it.

Why is it free?

Because there is nothing to pay for. The rules are already in your browser; this page bundles no data at all, just asks and displays. Nothing is uploaded and there is no account.

The figures in the article are checked by the test suite against the same API, so if CLDR revises a rule the prose fails the build instead of quietly becoming wrong. Where a claim depends on a language outside these five, the tests reach for that language rather than asserting it from the ones on show.