The number 31881 (thirty-one thousand eight hundred eighty-one) is written in Roman numerals as follows: XXXIDCCCLXXXI