The number 49871 (forty-nine thousand eight hundred seventy-one) is written in Roman numerals as follows: XLIXDCCCLXXI