Free graph maker & data converters

Hooke's Law Graph Maker

Plot force against extension for a spring, fit a straight line and read the spring constant from the slope. The sample is a set of eight readings.

Your data
8 rows × 2 columns · tab-separated
Graph
123456780.00.51.01.52.0Extension (cm)Force (N)Force (N)y = 0.2495x − 6.429×10-4, R2 = 0.9999
Hover over a point to read its value.
Statistics
SeriesnMeanMedianSDSEMinMax
Force (N)81.1221.11750.611120.216060.2461.99
SeriesModelEquationParametersR²
Force (N)lineary = 0.2495x − 6.429×10⁻⁴b = -6.4286e-4, m = 0.249480.99991
Chart options
Y seriesError bars (±)

Units: m^2 → m², H_2O → H₂O, 10^{-3} → 10⁻³, \mu → μ, \deg → °

How to use the Hooke's Law Graph

  1. Hang masses on the spring, calculate the force F = mg and measure the extension from the unloaded length.
  2. Paste extension in the first column and force in the second, or edit the sample.
  3. Keep the linear trendline for the equation and R².
  4. The slope is the spring constant k. Convert units if extension is in cm.

Hooke’s law and the graph

Hooke’s law says the force needed to extend a spring is proportional to the extension: F = kx, where k is the spring constant in newtons per metre. A graph of force (Y) against extension (X) is therefore a straight line through the origin, and its gradient is k. A stiff spring has a steep line and a large k; a soft spring has a shallow one.

Worked example

The sample readings run from 1 cm (0.246 N) to 8 cm (1.990 N). The fit is F = 0.2495 × x − 0.0006 (x in cm), R² = 0.9999. The slope is 0.2495 N/cm, which is 24.95 N/m, so the spring constant is about 25 N/m. The intercept is essentially zero, as the law predicts. A force of 1.5 N would stretch this spring by 1.5 / 24.95 = 0.060 m, or 6.0 cm.

Extension (cm)12345678
Force (N)0.2460.4980.7540.9931.2421.5071.7461.990

Where Hooke’s law stops working

Every real spring has an elastic limit. Beyond it the extension is no longer proportional to the force, the graph curves, and the spring does not return to its original length when unloaded. If your last few points drift below the line, fit only the straight part and say so in the report. Common experimental errors are reading the extension from the wrong zero, forgetting the mass of the hanger, and mixing centimetres and metres: always convert before quoting k. For uncertainty on k, check the standard error of the slope in the line of best fit calculator.

Frequently asked questions

How do I calculate the spring constant from a graph?
Plot force against extension and find the gradient of the line. The gradient is k. Make sure extension is in metres to get N/m.
Should the line go through the origin?
In theory yes, since no extension means no force. A small intercept can come from the hanger’s weight or a zero error.
What if my graph curves at the end?
The spring has passed its limit of proportionality. Fit only the straight section and report the range.
Is my data private?
No. Your data never leaves your browser. Plotiq parses and plots files locally with JavaScript, so nothing is uploaded to a server.

Last updated: · by Dev Patel ·Read our guides