This paper presents an analytical solution associated with the steady-periodic heat transfer for a typical slab-on-grade floor building foundation in contact with a nonhomogeneous soil medium. In particular, the solution accounts for the impact of the above-grade wall thickness on the ground-coupled heat transfer. The interzone temperature estimation profile (ITPE) technique is utilized to obtain the analytical solution to determine soil temperature distributions and to estimate foundation heat loss/gain from slab-on-grade floors. In this paper, the impact of the nonhomogeneous soil properties on the transient foundation heat transfer is investigated for various slab configurations and soil thermal properties. The presented solution presents the first ITPE analytical solution for building foundation coupled with layered soil medium. The results indicate that nonhomogeneous soil properties have a significant effect on soil temperature distribution and on total slab heat loss. In particular, it is found that an error of up to 20% in estimating total slab heat transfer can be incurred if homogeneous soil medium is considered instead of a two-layered ground.