Recently the compensator has been shown to be an inexpensive and reliable dose delivery device for photon beam intensity-modulated radiation therapy (IMRT). The goal of IMRT compensator design is to produce an optimized primary fluence profile at the patient's surface obtained from the optimization procedure. In this paper some of the problems associated with IMRT compensator design, specifically the beam perturbations caused by the compensator, are discussed. A simple formula is derived to calculate the optimal compensator thickness profile from an optimized primary fluence profile. The change of characteristics of a 6 MV beam caused by the introduction of cerrobend compensators in the beam is investigated using OMEGA Monte Carlo codes. It is found that the compensator significantly changes the energy spectrum and the mean energy of the primary photons at the patient's surface. However, beam hardening does not have as significant an effect on the percent depth dose as it does on the energy spectrum. We conclude that in most situations the beam hardening effect can be ignored during compensator design and dose calculation. The influence of the compensator on the contaminant electron buildup dose is found to be small and independent of the compensator thickness of interest. Therefore, it can be ignored in the compensator design and included as a correction into the final dose distribution. The scattered photons from the compensator are found to have no effect on the surface dose. These photons produce a uniform low fluence distribution at the patient's surface, which is independent of compensator shape. This is also true for very large fields and extremely asymmetric and nonuniform compensator thickness profiles. Compared to the primary photons, the scattered photons have much larger angular spread and similar energy spectrum at the patient's surface. These characteristics allow the compensator thickness profile and the dose distribution to be calculated from the optimized fluence profile of primary photons, without considering the scattered photons.