Sign in

Docs Help



Functions: Roman function

Print

Use this formula to convert numbers into Roman numerals. To get started, type this into a cell: =ROMAN(number, form)

The formula asks for two arguments and returns a Roman numeral that represents the number you entered. These are the two arguments:

  • number: this is the number that you want to convert into Roman numerals. It must be an integer number between 1 and 3999, inclusive. ROMAN can't convert negative numbers or zero to Roman numerals, nor can it convert numbers greater than 3999.
  • form: this is an optional parameter, but if you include it, it has to be an integer between 0 and 4, inclusive. The higher the form, the more simplified the Roman numeral will be.

Here's an example of how 'form' works:

Suppose you want to convert 499 into Roman numerals. The traditional, most classic Roman numeral conversion would return CDXCIX. This follows the strictest rules for converting numbers to Roman numerals. In general, Roman numerals are additive; each character represents a number, and the whole number is calculated by adding all the characters together (for example: XX = 20 = 10 + 10). However, if a smaller number precedes a larger, the smaller number gets subtracted (for example: IV = 4 = -1 + 5). Traditionally, there are rules about what numbers can appear before others, but these rules get broken as you start simplifying.

So breaking CDXCIX down by character, you get 100, 500, 10, 100, 1, 10. You'd add them up like this: (-100 + 500 + -10 + 100 + -1 + 10) = (400 + 90 + 9) = 499.

However, if you aren't as strict about which numbers can precede others, you can get a shorter version: LDVLIV. This breaks down to 50, 500, 5, 50, 1, 5. Or (-50 + 500 + -5 + 50 + -1 + 5) = (450 + 45 + 4) = 499.

You can continue simplifying all the way from XDIX to VDIV to ID = (-1 + 500) = 499. This breaks all traditional rules for calculating Roman numerals, but is technically a valid representation of 499.

Some examples:

=ROMAN(499) returns CDXCIX
=ROMAN(499, 0) returns CDXCIX
=ROMAN(499, 1) returns LDVLIV
=ROMAN(499, 2) returns XDIX
=ROMAN(499, 3) returns VDIV
=ROMAN(499, 4) returns ID
Was this information helpful?

Show others how you're using Google Spreadsheets functions. Create a template and submit it to the Google Docs template gallery.

Docs for teachers and businesses

Docs for business

Docs for teachers

Adding Docs to a Website

Sounds great! Tell me more.