The Romans used the letters C, D, I, L, M, V and X, to write down numbers, each standing for a different value. For instance, X represents the number 10. By repeating letters, multiples could be written, eg 20 is XX, 30 is XXX. The letters were chosen so that their values added up to the number required. Here are the values of the letters they used:
You can still see them used on foundation stones of old buildings or plaques commemorating the opening of new buildings, the date some TV programmes were made (see the credits page at the end of the programme) and on some clocks.
13 would be written as XIII
2003 would be MMIII
99 would be LXXXXVIIII and
1998 is MDCCCCLXXXXVIII.
Later, instead of just adding the values, subtraction was used also. Here, the numbers were arranged so that larger letters appeared first, the smaller ones later. So if a smaller value preceded a larger one, it was to be subtracted. However, this only applied to the next smaller quantity. So 1999 might have been written as IMM (one less than two thousand) or 1900 might have been written as CMM (or one hundred less than two thousand) but the next smaller quantities are hundreds and so only C went before M, 1900 being written as CM.
Here is a Web page calculator that will convert Arabic numbers into Roman numerals and Roman numerals into Arabic numbers.