The number 40487 (forty thousand four hundred eighty-seven) is written in Roman numerals as follows: XLCDLXXXVII