The number 40164 (forty thousand one hundred sixty-four) is written in Roman numerals as follows: XLCLXIV