Purpose: To calibrate an algorithm for digitally reconstructed radiographs (DRRs) such that synthetic projections cast through an object in a fan‐beam CT (FBCT) optimally match cone‐beam CT projections of the same object. Methods: Our DRR algorithm models the transmission of primary photons through an object with a ray‐tracing algorithm that samples the CT at small steps along each source‐detector pixel path. Sampled CT values are converted to linear attenuation coefficients (LACs), scaled by the step‐size, and added to a running sum for each detector pixel. We made attenuation measurements of materials of known CT number to calibrate a CT to LAC conversion function for our FBCT and CBCT systems. DRRs are post‐ processed to reproduce the tube output, source fluence distribution, and detector response of the CBCT system. In addition, they are modified to account for scatter, beam hardening, and detector veiling glare. Finally, we determined CBCT geometry parameters using a specially designed phantom. Results: We analyzed the quality of our DRR algorithm by directly comparing synthetic DRRs cast through the FBCT of a Catphan® phantom with actual CBCT projections of the phantom. Line plots comparing the intensity profiles of the DRRs and CBCT projections show that uncorrected DRRs do not align perfectly with the projections. However, when scatter, beam hardening, and veiling glare are modeled there is much closer agreement. Simulations with different geometry phantom shapes and sizes recommend a cylindrical phantom 150 mm in diameter. Computational times under one second per DRR are achieved using a GPU for a simulated 1024×768 pixel detector with a 512×512×281 mm CT volume and 0.5 mm ray step‐size. Conclusions: Our DRR algorithm is able to closely reproduce actual CBCT projections taken through a test object. It is optimized specifically for the FBCT and CBCT systems in our department. Funded in part by NCI grants R01CA123299 and P01CA116602. The authors report no conflicts of interest.