Aims. Solar energetic particles (SEPs) have been measured directly in space over the past decades. Rare extreme SEP events are studied based on terrestrial cosmogenic proxy data for the past ten millennia. Lunar rocks record the average SEP fluxes on the megayear timescale. The question of whether the SEP fluxes averaged over different timescales are mutually consistent is still open. Here we analyze these different datasets for mutual consistency. Methods. Using the data from directly measured SEPs over the past decades and reconstructions of extreme SEP events in the past, we built a distribution function of the occurrence of annual SEP fluences for SEPs with energies above 30, 60, 100, and 200 MeV. The distribution function was fit with the Weibull and other types of distributions, and the long-term average SEP flux was computed and compared with the megayear SEP flux estimated from lunar data. Results. In contrast to the current paradigm, the direct space-era data are not representative of the long-term averaged SEP flux because they are only 20–55% of it, while the major fraction was formed by rare extreme SEP events in the past. The combined statistics of direct and proxy data are fully consistent with megayear lunar data, implying that our knowledge of the whole range of the SEP fluxes, from frequent weak to rare extreme events, is now consistent.