The number 138040 (one hundred thirty-eight thousand forty) is written in Roman numerals as follows: CXXXVIIIXL