Recent sensitive wide-field radio surveys, such as the LOFAR Two-metre Sky Survey (LoTSS), the LOFAR LBA Sky Survey (LoLSS), and the Very Large Array Sky Survey (VLASS), enable the selection of statistically large samples of peaked spectrum (PS) sources. PS sources are radio sources that have a peak in their radio continuum spectrum and are observed to be compact. They are often considered to be the precursors to large radio galaxies. We present a sample of 8032 gigahertz-peaked spectrum (GPS) sources with spectral turnovers near 1400 MHz, and a sample of 506 megahertz-peaked spectrum (MPS) sources with turnovers near 144 MHz. Our GPS sample is over five times larger than any previously known sample of PS sources. These large sample sizes allow us to make a robust comparison between GPS sources and MPS sources, such that we can investigate the differences between these types of sources, and study their lifetimes. The shape of the source counts of both samples match that of the general radio-loud active galactic nuclei (AGN) samples, scaled down by a factor 44 ± 2 for the MPS sample, and a factor 28 ± 1 for the GPS sample. Assuming no cosmological evolution, these offsets imply that both MPS and GPS sources have a shorter duration than general radio-loud AGN, with MPS sources having an ≈1.6 times shorter lifespan than GPS sources. The shorter duration of MPS sources relative to GPS sources can be explained by the transition between GPS and MPS sources coinciding with the jet breakout phase of PS sources, such that GPS sources traverse through the surrounding medium at a lower speed than MPS sources. Such evolution has been observed in simulations of PS source evolution.