Purpose: Treatment plans for the TomoTherapy unit are produced with a planning system that is integral to the unit. The authors have produced an independent dose calculation system, to enable plans to be recalculated in three dimensions, using the patient's CT data. Methods: Software has been written using MATLAB. The DICOM-RT plan object is used to determine the treatment parameters used, including the treatment sinogram. Each projection of the sinogram is segmented and used to calculate dose at multiple calculation points in a three-dimensional grid using tables of measured beam data. A fast ray-trace algorithm is used to determine effective depth for each projection angle at each calculation point. Calculations were performed on a standard desktop personal computer, with a 2.6 GHz Pentium, running Windows XP. Results: The time to perform a calculation, for 3375 points averaged 1 min 23 s for prostate plans and 3 min 40 s for head and neck plans. The mean dose within the 50% isodose was calculated and compared with the predictions of the TomoTherapy planning system. When the modified CT (which includes the TomoTherapy couch) was used, the mean difference for ten prostate patients, was -0.4% (range -0.9% to +0.3%). With the originalmore » CT (which included the CT couch), the mean difference was -1.0% (range -1.7% to 0.0%). The number of points agreeing with a gamma 3%/3 mm averaged 99.2% with the modified CT, 96.3% with the original CT. For ten head and neck patients, for the modified and original CT, respectively, the mean difference was +1.1% (range -0.4% to +3.1%) and 1.1% (range -0.4% to +3.0%) with 94.4% and 95.4% passing a gamma 4%/4 mm. The ability of the program to detect a variety of simulated errors has been tested. Conclusions: By using the patient's CT data, the independent dose calculation performs checks that are not performed by a measurement in a cylindrical phantom. This enables it to be used either as an additional check or to replace phantom measurements for some patients. The software has potential to be used in any application where one wishes to model changes to patient conditions