Because light emitted in the interior regions of the Sun cannot be observed, the interior structure of the Sun must be deduced from theory. The **interior structure** is defined by numerical functions that show how every relevant physical factor changes as the radius r increases from r = 0 km at the center of the Sun outward to the radius of the photosphere (r = 700,000 km). The physical factors include mass M(r), density ρ(r), pressure P(r), luminosity L(r), temperature T(r), energy generation rate per unit mass ρ(r), opacity κ(r), chemical composition [the fraction by mass that is hydrogen X(r); the fraction by mass that is helium Y(r); and the fraction by mass that represents all heavier elements Z(r)], and the mean molecular weight μ(r).

Computer calculation of these functions treats the interior of the Sun as if it were composed of spherical layers like the inside of an onion, with conditions slowly changing from layer to layer. The laws of physics relate each layer to the others, providing the mathematical equations that allow each physical quantity to be numerically determined in each layer. These laws include **mass continuity,** which states that in each layer, the addition of mass to M(r) is equal to the density times the surface area of the layer times its thickness. The principle of **hydrostatic equilibrium** states that gas pressure (force per unit area) in each layer must balance the inward gravitational pull or weight of all overlying layers. **Thermal equilibrium** relates the change of energy per second flowing outward through each layer (that is, the luminosity) to the energy generation rate in that layer. The **equation of state** prescribes the relation of gas pressure to the temperature and particle density at any point. Furthermore, in each layer, the computations must check to see how energy is flowing through that layer, by the diffusion outward of photons (radiation) or by mass motion (convection); if the change in temperature over a distance is too great, then photons are unable to carry away energy and hotter material will move upwards into cooler regions (convection). Additional equations allow calculation of the **opacity,** a measure of how opaque the material is. Finally, there are the equations to determine energy generation, which depends on the density, temperature, and chemical composition.

Modern computer programs involve up to 250,000 lines of computer code to obtain a star's interior structure. The results are only weakly dependent upon some necessary assumptions that must be made in these calculations, hence the interior of the Sun is believed to be fairly accurately known and calculations are referred to as the **Standard Solar Model**. In this model, the central conditions are computed to be a density of 150 g/cm ^{3} and a temperature of 15,000,000 K.