In compliance with the principle of relativity, a time dilation equation expressed as an energy ratio is used to combine time dilation due to motion and due to gravitational attraction. To show the correlation with the time dilation equations, the Lorentz factor and the gravitational time dilation equations are derived from the equation. The equivalence between the time dilation due to motion and due to gravitational attraction emerges and a combination of both is made possible using the energy ratio equation.