We present analytic flux prescriptions for broadband spectra of self-absorbed and optically thin synchrotron radiation from gamma-ray burst afterglows, based on one-dimensional relativistic hydrodynamic simulations. By treating the evolution of critical spectrum parameters as a power-law break between the ultrarelativistic and non-relativistic asymptotic solutions, we generalize the prescriptions to any observer time. Our aim is to provide a set of formulas that constitutes a useful tool for accurate fitting of model-parameters to observational data, regardless of the dynamical phase of the outflow. The applicability range is not confined to gamma-ray burst afterglows, but includes all spherical outflows (also jets before the jet-break) that produce synchrotron radiation as they adiabatically decelerate in a cold, power-law medium. We test the accuracy of the prescriptions and show that numerical evidence suggests that typical relative errors in the derivation of physical quantities are about 10 per cent. A software implementation of the presented flux prescriptions combined with a fitting code is freely available on request and on-line. Together they can be used in order to directly fit model parameters to data.