One of the greatest challenges in modern physics is to understand the behaviour of an ensemble of strongly interacting particles. A class of quantum many-body systems (such as neutron star matter and cold Fermi gases) share the same universal thermodynamic properties when interactions reach the maximum effective value allowed by quantum mechanics, the so-called unitary limit1, 2. This makes it possible in principle to simulate some astrophysical phenomena inside the highly controlled environment of an atomic physics laboratory. Previous work on the thermodynamics of a two-component Fermi gas led to thermodynamic quantities averaged over the trap3, 4, 5, making comparisons with many-body theories developed for uniform gases difficult. Here we develop a general experimental method that yields the equation of state of a uniform gas, as well as enabling a detailed comparison with existing theories6, 7, 8, 9, 10, 11, 12, 13, 14, 15. The precision of our equation of state leads to new physical insights into the unitary gas. For the unpolarized gas, we show that the low-temperature thermodynamics of the strongly interacting normal phase is well described by Fermi liquid theory, and we localize the superfluid transition. For a spin-polarized system16, 17, 18, our equation of state at zero temperature has a 2 per cent accuracy and extends work19, 20 on the phase diagram to a new regime of precision. We show in particular that, despite strong interactions, the normal phase behaves as a mixture of two ideal gases: a Fermi gas of bare majority atoms and a non-interacting gas of dressed quasi-particles, the fermionic polarons10, 18, 20, 21, 22.