The number 4871 (four thousand eight hundred seventy-one) is written in Roman numerals as follows: IVDCCCLXXI