---
name: "BIS_fnc_romanNumeral"
type: function
status: ok
groups: ["Strings", "Math"]
arma3_since: "1.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_romanNumeral
revid: 340860
updated: 2023-05-12T16:49:46Z
---

# BIS_fnc_romanNumeral

*Function · Strings, Math · Arma 3 v1.00*

## Description

Convert integer to roman numerals (e.g. 42 becomes "XLII").

## Syntax

```sqf
integer call BIS_fnc_romanNumeral
```

**Parameters:**

- `integer`: [Number](../topics/Number.md), [String](../topics/String.md), [Code](../topics/Code.md) or [Config](../topics/Config.md), same as [BIS_fnc_parseNumber](../functions/BIS_fnc_parseNumber.md) (used in this function) - any **integer** between 1 and 3999

**Returns:** [String](../topics/String.md) - roman numerals

## Examples

### Example 1

```sqf
1 call BIS_fnc_romanNumeral;        // returns "I"
2035 call BIS_fnc_romanNumeral;    // returns "MMXXXV"
3999 call BIS_fnc_romanNumeral;    // returns "MMMCMXCIX"
```

## See also

[BIS_fnc_ordinalNumber](../functions/BIS_fnc_ordinalNumber.md) · [BIS_fnc_phoneticalWord](../functions/BIS_fnc_phoneticalWord.md)

## Community notes

**Lou Montana** — 2019-10-01

A Roman numeral is read like this:

|  |  |  |  |  |  |  |  |
|---|---|---|---|---|---|---|---|
| Numeral | I | V | X | L | C | D | M |
| Value | 1 | 5 | 10 | 50 | 100 | 500 | 1000 |

- It is read from left to right from the biggest numeral to the lowest*, adding up:
- not entirely true, see subtractions below
  - `DCLVII` = `D` → `C` → `L` → `V` → `I` → `I` = 500 + 100 + 50 + 5 + 1 + 1 = 657
- A subtraction is done by writing **one** smaller numeral before a big one:
  - 9 could be written `VIIII`, or `IX`: 1 and 10, meaning 10 - 1 = 9 / but `IIX` for 8 does not exist, only `VIII`
- The same numeral can be put together multiple times, but *usually* (there is no standard, but the shorter version is usually preferred) up to the point where it can be subtracted from the numeral above the used one (subtraction still done with only **one** numeral):
  - `IIII` = `IV`, `CCCC` = `CD`

Now let's see if you can translate this one: `MCMLXXXV`. Tip: where it all started ;-) `MCMLXXXII` for the purists!

To learn more: **[Roman numerals on wikipedia](https://en.wikipedia.org/wiki/Roman_numerals)**

<sub>Source: [BI Community Wiki — BIS fnc romanNumeral](https://community.bistudio.com/wiki/BIS_fnc_romanNumeral) (revision 340860).</sub>
