Transmitted intensity through water was measured in a narrow-beam geometry for different energy x-ray beams from commercial accelerators. In order to accurately obtain the attenuation coefficient of the incident beam using transmission data, a novel formula was developed based on consideration of beam hardening in phantom. The value of the attenuation coefficient obtained by fitting transmission data to this formula was found to be independent of the absorber thickness used in experiments, whereas the attenuation coefficient obtained from the traditional formula, I(x)=I0 exp(−μx), changed by up to 7% with absorber thickness for a given beam. The beam hardening coefficient obtained from our formula indicates that the attenuation coefficient in water changes by about 0.33% per cm near the surface for the high-energy photon beams studied. Variations in beam quality with off-axis distance were subsequently investigated using the new formula. Results show that the attenuation coefficient at the water surface increased by about 15% for 15 and 18 MV beams, and by 11%–13% for 6 MV beams, when the off-axis distance at 100 cm from the source was changed from 0 to 18 cm. Consideration of the physics of bremsstrahlung production suggests that these variations should be mainly determined by the shape of the flattening filter, i.e., by the path length of rays traversing the filter in different directions. This expectation was confirmed by observing that the attenuation coefficient at the phantom surface can be related to the ray path of the beam in the flattening filter using the new transmission formula.