Elastic potential energy
Also called Spring potential energy
The energy stored in a stretched or compressed ideal spring, equal to one half the spring constant times the square of the displacement from the spring's natural length.
Stretch or squash an ideal spring and the work you put in is stored: , printed on all four AP equation sheets. is the spring constant in N/m, and is, in the CED's words, the distance the spring has been stretched or compressed from its equilibrium length.
The square settles two questions at once. Sign does not matter, so pulling a spring 4 cm out and pushing it 4 cm in store exactly the same energy, and can never come out negative. And the growth is quadratic: stretch it three times as far and it holds nine times the energy.
Measure from the spring's natural length. Not from the floor, not from wherever the block happens to be sitting. That single reference error is the usual reason a spring energy answer comes out wrong.
Keep the energy apart from the force. The spring force is linear in the stretch and is a vector; the stored energy is quadratic and is a scalar. A spring pulled twice as far pulls back twice as hard but holds four times as much energy.