The number 31870 (thirty-one thousand eight hundred seventy) is written in Roman numerals as follows: XXXIDCCCLXX