Mechanical energy (M.E) is the total sum of kinetic energy and potential energy in an object. In other words, it is termed as an energy acquired by the object due to its motion or position of work is done. From the below mechanical energy formula, you can calculate M.E of an object by knowing the kinetic and potential energies. Potential energy is the stored energy of an object in rest whereas kinetic energy is the energy in motion (i.e) movement of an object.
Mechanical Energy formula is derived from KE and PE formula, where Kinetic energy is 1/2 multiplied by mass and velocity square and potential energy is mass multiplied by gravity and height.