Studies of cool white dwarfs in the solar neighbourhood have placed a limit on the age of the Galactic disc of 8–9 billion years. However, determining their cooling ages requires the knowledge of their effective temperatures, masses, radii and atmospheric composition. So far, these parameters could only be inferred for a small number of ultracool white dwarfs for which an accurate distance is known, by ﬁtting their spectral energy distributions in conjunction with a theoretical mass–radius relation. However, the mass–radius relation remains largely untested, and the derived cooling ages are hence model dependent. Here we report direct measurements of the mass and radius of an ultracool white dwarf in the double-lined eclipsing binary SDSS J013851.54−001621.6. We ﬁnd M WD = 0.529 ± 0.010 M� and R WD = 0.0131 ± 0.0003 R�. Our measurements are consistent with the mass–radius relation and we determine a robust cooling age of 9.5 billion years for the 3570 K white dwarf. We ﬁnd that the mass and radius of the low-mass companion star, Msec = 0.132 ± 0.003 M� and Rsec = 0.165 ± 0.001 R�, are in agreement with evolutionary models. We also ﬁnd evidence that this>9.5 Gyr old M5 star is still active, far beyond the activity lifetime for a star of its spectral type. This is likely caused by the high tidally enforced rotation rate of the star. The companion star is close to ﬁlling its Roche lobe and the system will evolve into a cataclysmic variable in only 70 Myr. Our direct measurements demonstrate that this system can be used to calibrate ultracool white dwarf atmospheric models.