The number 40958 (forty thousand nine hundred fifty-eight) is written in Roman numerals as follows: XLCMLVIII