The number 31821 (thirty-one thousand eight hundred twenty-one) is written in Roman numerals as follows: XXXIDCCCXXI