What this calculator does
Calculate energy stored in a stretched or compressed ideal spring.
How it works
The calculator evaluates elastic energy U = ½kx²; spring-force magnitude = k|x|. 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
2-
?springConstant=Spring constant k (N/m)Number · Required · Default: 200
-
?displacement=Displacement x (m)Number · Required · Default: 0.1
Outputs
2-
energyElastic potential energy (J)Number · Primary output
-
forceSpring force magnitude (N)Number
Inputs and results
The inputs are Spring constant k (N/m), Displacement x (m). Results include Elastic potential energy (J), Spring force magnitude (N).