The main objective of this paper is the determination of the displacement field and the associated stresses in spherical pressure vessels made of functionally graded materials which are subjected to axisymmetric thermal and mechanical loadings. The material properties are arbitrary functions of the radial coordinate and the temperature field. A numerical solution of this steady-state thermoelastic problem is presented which is based on a multilayered approach. The developed method can be used as an analytical solution for layered composite spherical bodies. The equations of the steady-state heat conduction and field equations of thermoelasticity are used for the problem, furthermore the original problem is solved as the superposition of two subproblems with simpler loads. The results of the developed solution are checked by an analytical solution where the linear thermal expansion is a specific function of the radial coordinate and the temperature, furthermore the Young modulus depends on the radial coordinate. The numerical results for functionally graded spheres under the action of constant pressure and temperature load are compared to the results of finite element simulation.