⌘
Free global education tool · Reviewed 2026-10-06

Hooke’s Law and Spring Energy Calculator

Solve signed restoring force, stiffness or displacement for an ideal linear spring and calculate its elastic potential energy in SI units.

Reviewed by Mohammad QasimMethod and limitations disclosed
Interactive calculatorYour values stay on this device
Ready to calculate

Your result

Click Calculate

Enter your values, then click Calculate result.
Result uses last calculated inputs

How this calculator helps

This Hooke’s law calculator describes an ideal spring within its linear elastic range. The displacement is measured from its natural length and the force is the spring’s restoring force on the attached object. Solve for one unknown, then read the compatible signed values and elastic energy. The page supports a classroom spring worksheet; it cannot size a garage door spring, establish a safe material limit or infer the nonlinear behavior of a real mechanism.

How to use it

  1. 1

    Choose the unknown or identify the quantity required by your problem before entering measurements.

  2. 2

    Convert each supplied measurement to the SI units printed beside its field. Keep the directional sign convention consistent throughout the problem.

  3. 3

    Read the method and worked example, then click Calculate result. The saved result remains visible while you edit inputs.

  4. 4

    Check the units, limiting case and reconstructed equation before copying the answer into a report or worksheet.

ƒ

Formula and methodology

Frestoring = −k x; x = −F/k; k = −F/x; U = ½ k x².

The calculator applies the displayed arithmetic to the values entered on this device. It does not silently load a local tax rate, currency conversion or commercial assumption.

Worked calculation example

A spring with stiffness 200 N/m extended by +0.05 m has restoring force −10 N and stored elastic energy 0.25 J. The negative force points toward the natural-length position. An equal compression of −0.05 m produces restoring force +10 N with the same stored energy. In Stiffness mode, restoring force −10 N and displacement +0.05 m reproduce 200 N/m; using force +10 N would be incompatible with the stated restoring-force convention.

How to interpret your result

Read the solved unknown with the restoring-force sign convention. The energy is nonnegative even when force or displacement is negative. Reconstruct −kx to verify force and compare ½kx² with the energy. If a real measured spring disagrees systematically, inspect natural length, preload and the range where the linear model is valid rather than changing signs merely to force agreement.

For different inputs or formulas, use Work Energy Calculator; Kinetic Energy Calculator; Force Mass Acceleration Calculator.

Related questions this calculator covers

  • hookes law calculator
  • spring force calculator
  • elastic potential energy calculator

Scenario comparison

ScenarioWhat it shows
Extensionpositive displacement creates negative restoring force.
Compressionreversing displacement reverses force but preserves energy.
Stiffer springdoubling k doubles both force magnitude and storage at fixed displacement.

Common mistakes to avoid

  • Entering the external holding force with the restoring-force sign.
  • Using total spring length instead of extension.
  • Multiplying final force by full displacement without the one-half factor.
How to verify this result

For k = 200 N/m and x = 0.05 m, compute −kx = −10 N and ½kx² = 0.25 J. Reverse displacement and confirm force reverses while energy stays 0.25 J. Invert force and displacement to recover the same positive k. Units (N/m) × m² simplify to N·m, or joules.

Authoritative reference. Method reference checked for this worksheet. The calculation and examples are independently implemented; read the specific scope and units above.

What can affect the result?

Restoring force opposes displacement

The minus sign is essential when using signed one-axis values. Extension to the positive side creates force toward the negative side; compression to the negative side creates force toward the positive side. An external holding force for static equilibrium is opposite to the restoring force. If your measurement describes a hand’s holding force, convert its sign before using it in this restoring-force worksheet.

Stiffness must be positive

The spring constant k measures force change per displacement and is expressed in newtons per metre. A higher value means more force magnitude at the same displacement. In Stiffness mode, force and displacement must have opposing signs to infer positive k. Zero displacement gives no information about stiffness from a zero-force endpoint and is rejected for inversion rather than assigned an arbitrary constant.

Displacement is not the total length

Subtract the natural length from the current length to obtain x. A spring 0.20 m long at rest and 0.25 m long under load has extension 0.05 m, not 0.25 m. Compressing it to 0.18 m gives x = −0.02 m under the same positive-extension convention. Mixing centimetres and metres changes stiffness and energy substantially, so convert all lengths first.

Elastic energy is nonnegative

The energy expression squares displacement, giving equal storage for equal extension and compression magnitudes in the ideal model. It is one half the final force magnitude multiplied by displacement magnitude because force grows linearly from zero. Multiplying the final force by the entire displacement omits that one-half factor. The energy describes reversible elastic storage, not a maximum safe energy or a fatigue-life prediction.

Check the linear range with real data

Real springs can have preload, friction, hysteresis, end effects, coil contact and nonlinear force-extension behavior. Hooke’s law is a model within an appropriate range, not a guarantee for every length. Determine the relevant stiffness from a manufacturer specification or a measured linear slope. Do not use a single extrapolated result to justify loads, installation, repairs or personal safety decisions.

The result is a static relation

The worksheet does not simulate oscillation, damping, resonance or a moving mass’s time history. A spring can have the same instantaneous displacement in motions with different velocities. Its potential energy alone cannot give total oscillator energy without kinetic energy. Signed restoring force remains useful at that point, but the future motion requires a separate dynamic model and appropriate initial conditions.

Privacy and browser processing

Values entered on this page are processed in the current browser session. SolvePilot does not require an account and does not receive the values entered into the calculator. Refreshing or closing the page clears the working values unless the browser itself restores a previous session. Avoid entering identifying or account information because the calculation needs summary values only.

Accuracy and verification

Accuracy depends first on input quality. Confirm definitions, scales, dates and source information before entering a value. Keep an independent record of any result used for planning because this page does not create an official statement or retain a calculation history.

Limits of this estimate

Use only the disclosed input domains and model. Entering the external holding force with the restoring-force sign. Review the method-specific boundaries above and the linked source before interpreting a result. Calculations use browser floating-point arithmetic; displayed digits are not a measure of real-world certainty. Your entries stay on this device and are not submitted to a calculation server.

Important: Treat the result as a planning estimate. Confirm official requirements and consequential decisions with the relevant institution, authority or qualified professional.

Sources and review information

This tool uses a disclosed calculation and user-entered values; it does not embed private institutional data or guarantee an outcome.Read our editorial and calculation policy →About the author and reviewer →

Frequently asked questions

Why does the force have a minus sign?+

The spring restores toward natural length, opposite the displacement.

Is displacement the stretched spring’s total length?+

No. It is current length minus natural length.

Why is stored energy equal for extension and compression?+

The ideal expression contains x squared.

Can zero displacement reveal stiffness?+

No. A zero-force endpoint does not identify a unique positive stiffness.

Is this a spring safety or replacement calculator?+

No. It is an ideal linear relation, not a sizing or repair specification.