The number 27987 (twenty-seven thousand nine hundred eighty-seven) is written in Roman numerals as follows: XXVIICMLXXXVII