The calculation of mechanical energy is done via two components of mechanical energy, which are kinetic energy and potential energy.
Explanation:
Kinetic energy is the energy which is required to perform an action. Potential energy is the energy which the body has, just due to the virtue of being capable of doing work. Potential Energy is calculated by,
![U=\boldsymbol{m} * \boldsymbol{g} * \boldsymbol{h}](https://img.qammunity.org/2020/formulas/physics/middle-school/vtn6oltu8ou8ojg3uthlrql36g7dvb2koc.png)
Kinetic energy is calculated by,
![K .E.=(1)/(2) m v^(2)](https://img.qammunity.org/2020/formulas/physics/middle-school/jyig29ak9xonfm5quof6l1pf3v4xk14ylu.png)
Therefore, Energy=kinetic energy + potential energy
![\text { Energy } E=(1)/(2) m v^(2)+m g h](https://img.qammunity.org/2020/formulas/physics/middle-school/st5z3flkw12fi0mkkv0umn5tf1fsewp20r.png)