The relationship between head pteridine fluorescence (HPF) levels and age in adult females and males of a common necrophagous fly, Chrysomya megacephala, and effects of temperature and fly sex on the relationship were studied by pteridine fluorescence spectrophotometry. Factors affecting HPF levels in flies were found to include fly age, temperature and fly sex, among which the fly age was the most dominant one. There were significant linear relationships between HPF levels and age both for female and male adult flies at five constant temperatures, i. e. 16℃, 20℃, 24℃, 28℃ and 32℃. The relationship between mean rate of pteridine accumulation (FV or MV) and temperature(t)could be well described by a modified exponential equation of FV0.01288×e (0.2241t-3.127)+0.3649 (r20.9987) for females and a linear regression equation of MV0.0574 t-0.3637 (r20.9557) for males. Using the information from the experiments at five constant temperatures, three calculated methods as the candidates were developed for accurately determining the age of the fly by HPF levels at ambient temperature. The results revealed that these three methods were suitable for estimating the age only for male flies, but not for female flies. The smallest average error of the predicated age was 2.55 days for males. In addition, how to employ which of these three developed methods for determining ages of male flies in practical was also discussed.