The energy stored in a spring is calculated using the formula 0.5*Fd, which represents the area under the force versus displacement graph. This differs from the work done by constant forces, where W=Fd applies, as the area under the curve is rectangular only when the force is constant. In the case of a spring, the restoring force varies with displacement according to Hooke's Law (F = -kx), making the force a function of position. The area under the graph for a spring forms a triangle, necessitating the use of 0.5*Fd to find the work done. Understanding this concept can be enhanced through integral calculus, although basic area calculations can suffice for simpler cases.