The number 40945 (forty thousand nine hundred forty-five) is written in Roman numerals as follows: XLCMXLV