Better knowledge of CT number values and their uncertainties can be applied to improve heavy ion treatment planning. We developed a novel method to calculate CT numbers for a computed tomography (CT) scanner using the Monte Carlo (MC) code, BEAMnrc/EGSnrc. To generate the initial beam shape and spectra we conducted full simulations of an X-ray tube, filters and beam shapers for a Siemens Emotion CT. The simulation output files were analyzed to calculate projections of a phantom with inserts. A simple reconstruction algorithm (FBP using a Ram-Lak filter) was applied to calculate the pixel values, which represent an attenuation coefficient, normalized in such a way to give zero for water (Hounsfield unit (HU)). Measured and Monte Carlo calculated CT numbers were compared. The average deviation between measured and simulated CT numbers was 4 ± 4 HU and the standard deviation σ was 49 ± 4 HU. The simulation also correctly predicted the behaviour of H-materials compared to a Gammex tissue substitutes. We believe the developed approach represents a useful new tool for evaluating the effect of CT scanner and phantom parameters on CT number values.