Astrophysical shocks are often collisionless shocks. An open question about collisionless shocks is whether electrons and ions each establish their own post-shock temperature, or whether they quickly equilibrate in the shock region. Here we provide simple relations for the minimal amount of equilibration to expect. The basic assumption is that the enthalpy-flux of the electrons is conserved separately, but that all particle species should undergo the same density jump across the the shock. This assumption results in an analytic treatment of electron-ion equilibration that agrees with observations of collisionless shocks: at low Mach numbers ($<2$) the electrons and ions are close to equilibration, whereas for Mach numbers above $M sim 60$ the electron-ion temperature ratio scales with the particle masses $T_e/T_i = m_e/m_i$. In between these two extremes the electron-ion temperature ratio scales as $T_e/T_i propto 1/M_s^2$. This relation also hold if adiabatic compression of the electrons is taken into account. For magnetised plasmas the compression is governed by the magnetosonic Mach number, whereas the electron-ion temperatures are governed by the sonic Mach number. The derived equations are in agreement with observational data at low Mach numbers, but for supernova remnants the relation requires that the inferred Mach numbers for the observations are over- estimated, perhaps as a result of upstream heating in the cosmic-ray precursor. In addition to predicting a minimal electron/ion temperature ratio, we also heuristically incorporate ion-electron heat exchange at the shock, quantified with a dimensionless parameter ${xi}$. Comparing the model to existing observations in the solar system and supernova remnants suggests that the data are best described by ${xi} sim 5$ percent. (Abridged abstract.)