We present an analytic parametric model to describe the baryonic and dark matter distributions in clusters of galaxies with spherical symmetry. It is assumed that the dark matter density follows a Navarro–Frenk–White (NFW) profile and that the gas pressure is described by a generalized NFW profile. By further demanding hydrostatic equilibrium and that the local gas fraction is small throughout the cluster, one obtains unique functional forms, dependent on basic cluster parameters, for the radial profiles of all the properties of interest in the cluster. We show that these profiles are consistent with both numerical simulations and multiwavelength observations of clusters. We also use our model to analyse six simulated Sunyaev–Zel’dovich (SZ) clusters as well as A611 SZ data from the Arcminute Microkelvin Imager. In each case, we derive the radial profile of the enclosed total mass and the gas pressure and show that the results are in good agreement with our model prediction.