Accurate measurement of photon flux from an X-ray source, a parameter required to calculate the dose absorbed by the sample, is not yet routinely available at macromolecular crystallography beamlines. The development of a model for determining the photon flux incident on pin diodes is described here, and has been tested on the macromolecular crystallography beamlines at both the Swiss Light Source, Villigen, Switzerland, and the Advanced Light Source, Berkeley, USA, at energies between 4 and 18 keV. These experiments have shown that a simple model based on energy deposition in silicon is sufficient for determining the flux incident on high-quality silicon pin diodes. The derivation and validation of this model is presented, and a web-based tool for the use of the macromolecular crystallography and wider synchrotron community is introduced.