The geothermal gradient is the gradual warming of layers of rock relative to their distance from the Earth's surface. The average geothermal gradient is an increase of 1 degree Celsius for each 40 meters of depth.
The geothermal gradient occurs because radioactive decay of minerals, primarily in the Earth's crust, creates and holds heat in the inner layers of the Earth. This leads to red-hot rocks and molten magma with increasingly higher temperatures at lower depths. The geothermal gradient is higher at plate boundaries, where rising magma and heated groundwater create higher temperatures closer to the surface. Geothermal energy uses heat from lower, warmer parts of the Earth to heat homes and produce electricity.