Roman Numeral Converter
Convert numbers from 1 to 3999 to Roman numerals and back, with the subtractive rules explained step by step. The seven symbols are I = 1, V = 5, X = 10, L = 50, C = 100, D = 500 and M = 1000. Example: with number (1 to 3999) or roman numeral 1994, the result is Roman numeral = MCMXCIV.
Last updated · By S. Dilshan · Runs in your browser, nothing is uploaded
Step-by-Step Solution
How do you use the Roman Numeral Converter?
Type either an ordinary number from 1 to 3999 or a Roman numeral such as MCMXCIV into the single box. The calculator detects which one you entered and converts it the other way, so there is no mode to switch. Letters can be upper or lower case.
If you enter something that is not a standard numeral, such as IIII, the tool tells you the correct standard form instead of guessing. The solution box shows each step of the greedy conversion or the left-to-right reading.
What formula does the Roman Numeral Converter use?
The seven symbols are I = 1, V = 5, X = 10, L = 50, C = 100, D = 500 and M = 1000. Symbols are generally written from largest to smallest and added. A smaller symbol placed before a larger one is subtracted, but only in six cases: IV = 4, IX = 9, XL = 40, XC = 90, CD = 400 and CM = 900.
To convert a number, take the largest value from the table that fits, write its symbol, subtract and repeat. A symbol is never repeated more than three times in a row, which is why 4 is IV rather than IIII, and why standard numerals stop at 3999. There is no symbol for zero.
Worked example: 1994 and 2024
1994 = 1000 (M) + 900 (CM) + 90 (XC) + 4 (IV), which gives MCMXCIV. Reading it back, M is 1000, CM is 900, XC is 90 and IV is 4, so the total is 1,994. The year 2024 is MMXXIV: two thousands, two tens and a four. Note that the greedy method always matches the largest value that fits, including the two-letter subtractive pairs, so you never need to guess.
Where Roman numerals are still used
Roman numerals remain common on clock faces, in book chapters and prefaces, in film and television copyright years, for monarchs and popes such as Elizabeth II, in outlines and in major sporting events such as the Super Bowl. Knowing how to read them quickly is a handy general skill, and converting years is the most common task.
They are also a classic exercise in programming interviews because the conversion has a neat greedy solution and a small set of special cases. Testing your own implementation against this calculator is a quick way to find bugs.
What are the most common mistakes with the Roman Numeral Converter?
- Repeating a symbol four times, such as IIII or XXXX, instead of using the subtractive form.
- Subtracting a symbol from one that is too far away, for example writing IC for 99 instead of XCIX.
- Using the subtractive rule for V, L and D, which are never subtracted.
- Trying to write zero or numbers above 3999, which standard Roman numerals cannot express.
What Is the Tested Example for the Default Values?
This example is computed by the same code that powers the calculator above, so you can compare it with your own numbers or a textbook answer.
| Input: Number (1 to 3999) or Roman numeral | 1994 |
|---|---|
| Roman numeral | MCMXCIV |
| Number | 1994 |
Where Can You Verify These Formulas?
The definitions and formulas on this page follow standard references. Check them against these sources:
Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.
Frequently Asked Questions
How do you write 4 and 9 in Roman numerals?
4 is IV (one before five) and 9 is IX (one before ten). These subtractive forms avoid repeating a symbol four times.
What is the largest standard Roman numeral?
3999, written MMMCMXCIX. Larger numbers need extensions such as a bar over a symbol to multiply it by 1,000.
Is there a Roman numeral for zero?
No. The Romans had no symbol for zero, and the word nulla was occasionally used in writing instead.