What this calculator does
Solve spring force, spring constant, or displacement using Hooke’s law.
How it works
The calculator evaluates Hooke’s law F = −k × x, with k = −F/x and x = −F/k. Inputs are checked before calculation, and invalid values such as zero denominators or out-of-range selections produce a clear error instead of a misleading result.
Input query strings and outputs
Use an input name in this page’s URL as ?name=value, and join additional inputs with &. Portable shared links may instead use the compact ?ac= state parameter.
Input query strings
4-
?solveFor=Solve forChoice · Required · Default: force · Accepted values: force, springConstant, displacement
-
?force=Force F (N)Number · Required · Default: -20
-
?springConstant=Spring constant k (N/m)Number · Required · Default: 200
-
?displacement=Displacement x (m)Number · Required · Default: 0.1
Outputs
3-
resultSolved valueNumber · Primary output
-
unitUnitText
-
magnitudeMagnitudeNumber
Inputs and results
The inputs are Solve for, Force F (N), Spring constant k (N/m), Displacement x (m). Results include Solved value, Unit, Magnitude.