We present an analytical equation of state based on statistical-mechanical perturbation theory for hard spheres, using the Weeks–Chandler–Andersen decomposition of the potential and the Carnahan–Starling formula for the pair distribution function at contact, g(d+), but with a different algorithm for calculating the effective hard-sphere diameter. The second virial coefficient is calculated exactly. Two temperature-dependent quantities in addition to the second virial coefficient arise, an effective hard-sphere diameter or van der Waals covolume, and a scaling factor for g(d+). Both can be calculated by simple quadrature from the intermolecular potential. If the potential is not known, they can be determined from the experimental second virial coefficient because they are insensitive to the shape of the potential. Two scaling constants suffice for this purpose, the Boyle temperature and the Boyle volume. These could also be determined from analysis of a number of properties other than the second virial coefficient. Thus the second virial coefficient serves to predict the entire equation of state in terms of two scaling parameters, and hence a number of other thermodynamic properties including the Helmholtz free energy, the internal energy, the vapor pressure curve and the orthobaric liquid and vapor densities, and the Joule–Thomson inversion curve, among others. Since it is effectively a two-parameter equation, the equation of state implies a principle of corresponding states. Agreement with computer-simulated results for a Lennard-Jones (12,6) fluid, and with experimental p–v–T data on the noble gases (except He) is quite good, extending up to the limit of available data, which is ten times the critical density for the (12,6) fluid and about three times the critical density for the noble gases. As expected for a mean-field theory, the prediction of the critical constants is only fair, and of the critical exponents is incorrect. Limited testing on the polyatomic gases CH4, N2, and CO2 suggests that the results for spherical molecules (CH4) may be as good as for the noble gases, nearly as good for slightly nonspherical molecules (N2), but poor at high densities for nonspherical molecules (CO2). In all cases, however, the results are accurate up to the critical density. Except for the eight-parameter empirical Benedict–Webb–Rubin equation, this appears to be the most accurate analytical equation of state proposed to date.