We consider a nongravitating spherical isotropic elastic layered Earth where in each shell velocities are proportional to r and density is proportional to r-4 (r is the radial distance from the center of the Earth). Solutions of equations of motion in each shell are obtained in terms of exponential functions. A transformation, generating such solutions, is called an exact flattening transformation. Based on this transformation and generalized reflection-transmission coefficients, we consider dispersion equations for Love and Rayleigh waves in a spherical Earth. These equations are as simple as in a flat Earth, and computer programs are provided in the supplementary materials ( available in the electronic supplement to this article) to evaluate surface-wave velocities in a spherical Earth using the exact flattening transformation. The velocities of the fundamental mode of surface waves of periods between 10 and 300 sec are computed through exact and approximate flattening transformations. Errors in velocities with approximate transformation are seen to be above 1% from a 110 sec period. This shows that the exact transformation could preferably be used to compute long-period surface-wave velocities.