How to calculate
Use the decrease in gravitational potential energy between release and the current angle. The vertical drop is length times the difference of the two angle cosines.
Worked example
Use Mass (kg) 2 · Length from pivot to bob center (m) 2.5 · Gravitational acceleration (m/s²) 10 · Release angle from vertical (degrees) 60 · Current angle from vertical (degrees) 0. The result is ≈ 25 J.
Input and result notes
Use angle magnitudes from the downward vertical. The current angle cannot exceed the release angle.