MechSimulator

Hooke’s Law Experiment Simulator

Hang slotted masses • Read the rule • Find k from the gradient — Experiment • Simulate • Explore • Practice • Quiz

Mode
Units
Pick a slotted mass, press Add mass and read the extension off the rule — or switch to Simulate to drag the weight. Ctrl+Z undo, Ctrl+Shift+Z redo.
Display Controls
Spring k 80 N/m
N/m
Mass 0.0 kg
kg
Mass presets
k presets
Config
Force
0.00 N
Extension
0.0000 m
Energy
0.000 J
k effective
80.0 N/m
📖 Learning panels
Σ Live equations — values substituted from current state
💡 What-if coach — insights from current values
User Guide — Hooke’s Law Experiment Simulator
1 Overview

This is a free Hooke’s law experiment — a virtual spring lab that runs the real practical rather than just drawing its answer. Pick a spring off the rack, hang brass slotted masses on the hanger one at a time, read the extension off a graduated rule, and take the spring constant from the gradient of your F–x graph, exactly as you would in a school or college laboratory. Every reading is quantised to the rule’s own graduation, so the residuals are real and the fitted k is honestly imperfect.

A second Simulate mode keeps the original calculator behaviour: set the spring constant k (10–1000 N/m) and the mass (0–50 kg) directly, and watch F = kx plot live with a colour-coded equation overlay. It also covers series and parallel springs, the elastic limit and elastic potential energy (Ep = ½kx²).

Built for physics and engineering students who need a spring constant experiment they can actually run — for a lab report, for revision, or when the laboratory is closed. Includes classical LaTeX equation rendering, a step-by-step calculation modal, an SI or imperial bench, CSV / PNG export and full undo/redo. No equipment, no sign-up.

2 Setting the Scene
Hookes Law simulator interface preview

The tool opens in Experiment mode on Spring A, with an empty hanger. You see the spring hanging from its bracket, a graduated rule beside it zeroed on the unloaded length, a ×10 magnifier that resolves the graduation you are reading to, the mass tray showing the next slotted mass at 2:1, and an empty F–x graph waiting for your first point.

Use the Mode pills to move between Experiment, Simulate, Explore, Practice and Quiz. The SI / Imperial toggle does more here than relabel numbers: it swaps the whole bench. SI gives you 10–100 g slotted masses against a millimetre rule; Imperial gives you an avoirdupois set (¼, ½, 1, 2 and 4 oz) against an inch rule graduated in sixteenths, with loads in lbf and k in lbf/in. Because you cannot restate a hanger of 20 g + 50 g in ounces, switching bench empties the hanger and clears the readings — one Ctrl+Z brings both back. Internal calculations are always SI.

3 Experiment Mode — Running the Hooke’s Law Practical

1. Choose a spring. Three real springs sit on the rack, each derived from its wire and coil geometry using Shigley’s equations rather than typed in: Spring A (music wire, ASTM A228, k ≈ 15 N/m, holds 400 g), Spring B (302 stainless, A313, k ≈ 27 N/m, 800 g) and Spring C (hard-drawn, A227, k ≈ 46 N/m, 1.5 kg). k is the unknown you are measuring — the panel never shows it until your own fit does.

2. Pick a slotted mass. The [−] [value] [+] picker steps through the denominations in the drawer: 10–100 g in 10 g steps on the SI bench, or ¼, ½, 1, 2 and 4 oz on the imperial one. There is no free-text box because there is no 37 g slotted mass to pick up. The tray draws the selected mass in top view at 2:1 with its denomination embossed in the brass and its real size printed underneath (a 100 g mass is Ø45 × 8.4 mm; a 1 oz mass is Ø1¾ × 0.096 in). A mass that would overload the hanger is greyed out before you click.

3. Add mass, and let it settle. Add hangs the selected mass on the carrier plate; the stack grows upward, and each disc’s drawn thickness is proportional to its mass, so the hanger shows you what is on it at a glance. The spring rings and the status reads “steadying…” — no reading is ever taken from a moving spring. Remove takes off the last mass you added, the way a hand would; Reset takes every mass off and clears the readings and graph for a fresh run on the same spring (Ctrl+Z brings them back); New spring fetches an undamaged one and clears the table.

4. Read the rule. The rule is about 1 px per graduation, which is deliberately too fine to read off the drawing — use the ×10 magnifier, exactly as you would lean in on the bench. The value it shows is the value that gets recorded: to the nearest millimetre on the SI bench, or the nearest sixteenth of an inch in imperial, printed as a proper fraction (5 3/16 in).

Series, parallel and combination. The Setup row switches from one spring to an arrangement. Build it one spring at a time: each numbered card picks Spring A, B or C and shows its own k; + Add spring adds a third, × removes it. Series hangs the springs end to end (1/keq = 1/k1 + 1/k2 + …), Parallel hangs them side by side under a level spreader bar (keq = k1 + k2 + …, with the load hung at the bar’s stiffness centre so every spring stretches the same), and Combination joins springs 1 and 2 in parallel and that pair in series with spring 3 (1/keq = 1/(k1+k2) + 1/k3). The formula’s prediction is shown before you start; load the arrangement, take readings exactly as for one spring, and Find keq compares the k from your gradient with the formula and says why the arrangement is softer or stiffer. The hanger stops at the load where the first spring would reach its elastic limit, so no spring is damaged and the formula stays exact.

5. Plot the points — no line is drawn for you. Every settled reading is added to the results table (mass, load F = mg, extension x, and x/F) and plotted as a point. The graph deliberately does not draw a best-fit line as you go: deciding that you have enough readings, and then taking the gradient, is the experiment.

6. Find the modulus. The Find Modulus button (in the toolbar, and on the canvas beside the rule) stays disabled until your readings determine the gradient: at least three points below the elastic limit, and few enough rounding errors from the rule’s graduations that k is known to within ±3 %. Until then it tells you what is missing (“1 more reading”, “k uncertain by up to ±5.1 % — add another mass, or use a heavier step”, or “at 100 g this spring yields after 2 readings — pick 50 g or lighter”). You never have to load the spring near its limit: with a sensible step the button is ready at a quarter to half of it, and points past the red line are plastic and excluded from the fit. When the button lights up and blinks, press it. Auto test (beside Remove) runs the whole practical for you after asking first: it fetches a fresh spring, hangs equal masses one at a time, waits for each to settle and reads the rule, then presses Find Modulus itself — useful to see the method once, but the skill is doing it yourself. Press it again to stop. The tool draws the best-fit line through your points, grows a gradient triangle on it showing Δx and ΔF, and writes out the calculation:

  • k = ΔF/Δx — the spring constant, against the true value and the percentage error.
  • G = 8kD³n/d⁴ — the modulus of rigidity. This is the material property the experiment really measures: the wire of a close-coiled spring is loaded in torsion, not tension. Measured well, it recovers the material’s published G to a fraction of a percent (81 GPa / 11.75 Mpsi for music wire).
  • E = 2G(1+ν) — Young’s modulus, shown as a derived figure with ν = 0.29 stated, because this experiment cannot measure Poisson’s ratio. For music wire it lands at about 209 GPa (30 Mpsi), the accepted figure for steel.

Reading to the nearest millimetre typically costs about 0.1 % on k; the coarser sixteenth-inch rule costs nearer 0.7 % — a difference you can see for yourself by running the same spring on both benches. Adding another mass, changing spring or switching bench clears the result, because the fit it drew is no longer the fit of the data on the table.

7. Push it past the elastic limit. Keep loading and the F–x line bends onto the shallower plastic branch. Those points are shaded and excluded from the fit. Take the masses back off with Remove and the spring does not return to its original length — it keeps a permanent set, the rule’s zero no longer matches the spring, and any readings taken against the old zero are faded out and left out of the fit rather than silently mixed in. Readings taken while unloading from beyond the limit are still elastic and still count: they lie on a line of the same gradient, shifted by the permanent set.

8. Export. CSV writes the spring’s specification, the reading resolution and every row you recorded, in the units the bench was read in — ready to paste into a spreadsheet and re-plot. Once the modulus has been found, Report unlocks and builds a complete printable lab report: specimen details, the full observations table with each row marked fitted or excluded, the graph redrawn on white with the fitted line and the gradient triangle, the worked calculation of k, G and E, the reading-resolution error bound, and signature blocks. Use your browser’s print dialog to save it as a PDF.

4 Simulate Mode & Controls

Sliders + steppers: Drag a slider or use the [−] [value] [+] stepper to set spring k or mass precisely. Type a value directly into the stepper input (in the currently displayed unit) and press Enter.

Drag the weight directly on the canvas — the cursor turns into a grab icon when hovering. Pull it down to stretch the spring; mass and all readouts update live.

Mass presets (1, 2, 5, 10, 20 kg) and k presets (Soft 20, Med 80, Stiff 200, Very stiff 500) let you jump to common values.

Config pills switch between Single, Series and Parallel spring arrangements: series springs are softer (1/keff = 1/k1 + 1/k2), parallel springs are stiffer (keff = k1 + k2).

Toggles: Show Elastic Limit (red zone past x = 0.12 m), Show Energy Area (shaded triangle under F–x), Show Equation (canvas overlay).

5 Learning Panels & Show Calculations

Below the simulator, the Learning panels include collapsible cards rendered in classical LaTeX:

  • Live equations — current state substituted into F = mg, x = F/keff, Ep = ½kx² (using KaTeX rendering).
  • What-if coach — tips and warnings based on your current k, mass and config (e.g. elastic-limit alert, soft-spring + heavy-mass warnings).

Click Show Calculations (blue floating button at the canvas’s bottom-right) to open a step-by-step modal showing the full derivation in classical math notation, recomputed live every time you open it.

6 Keyboard, Right-Click & Export

Keyboard shortcuts: Ctrl+Z undoes any change (slider, stepper, preset, config, unit toggle), and Ctrl+Shift+Z redoes. Esc closes the calculation modal or the right-click menu.

Right-click the canvas to get a context menu with: Copy current values to clipboard, Export CSV (mass sweep through k, F, x, E with limit flag), Export PNG (canvas snapshot with watermark), Toggle grid background, and Reset.

In Experiment mode the CSV button beside the transport exports something different and more useful for a write-up: the spring’s specification, the reading resolution, and one row per reading you actually took — mass, load, extension, the datum it was measured against, and whether it was past the elastic limit — in the units the bench was read in.

7 Explore, Practice & Quiz

Explore mode provides concept cards across four categories: Fundamentals, Springs, Energy, and Applications. Each card includes a formula, diagram, and worked example — useful for the theory section of a Hooke’s law lab report once you have the measurements from Experiment mode.

Practice mode generates unlimited random problems: calculate force from k and x, extension from F, elastic PE, or effective k of series/parallel combinations. Step-by-step solutions are revealed after each attempt.

Quiz mode presents 5 randomised questions per session, mixing conceptual and numerical items. A detailed per-question score breakdown is shown at the end (tracked accurately for each question).

8 Tips & Best Practices
  • Compare Single vs Series vs Parallel: Apply the same load to all three configurations to see how effective stiffness changes the extension.
  • Watch the energy shading grow as you add mass — it provides a visual proof that Ep = ½kx² is the area of a triangle.
  • Push past the elastic limit (red zone) to see why springs must be designed to operate within their proportional range.
  • Run the experiment before you read the answer. Load a spring in equal steps, plot every point, and take k from the gradient. Then check it against the true value the tool prints — the gap is your measurement error, and seeing it is the point of the practical.
  • Take several readings in equal, not-too-small steps. A gradient through several well-spread points is far less sensitive to a one-millimetre misreading than a single F/x calculation, which carries the whole rounding error on its own.
  • Compare the two benches on the same spring. The millimetre rule recovers k to about 0.1 %; the sixteenth-inch rule to about 0.7 %. Same physics, coarser instrument — a clean demonstration of why resolution matters more than arithmetic.
  • Overload a spring on purpose, then unload it. Watching the line bend and the zero shift is the fastest way to understand why a spring has a working range, and why a stretched one is never quite the same spring again.
  • Toggle to Imperial for an avoirdupois bench — ounce slotted masses, an inch rule in sixteenths, loads in lbf and k in lbf/in. Note this swaps the apparatus and clears the hanger; internals stay SI, so nothing is lost to conversion.
  • Use the Show Calculations modal when working through homework — every step is shown with substituted values in classical math notation.
  • Export CSV for any (k, config) combination and import into a spreadsheet or Python for further analysis.

Understanding Hooke’s Law — Free Interactive Simulator

Hookes Law simulator in Experiment mode: a helical spring carrying 200 g of brass slotted masses on a hanger, a millimetre rule beside it, a magnifier reading the extension as 130 mm, and the force-extension graph plotting five recorded readings on a straight line below the elastic-limit marker
Experiment mode: 200 g of brass slotted masses on the hanger, the extension read off the rule to the nearest millimetre, and every reading plotted. The gradient of that line is the spring constant k.

Hooke’s Law states that the force a spring exerts is directly proportional to its extension: F = kx. The constant k is the spring constant in N/m. This law holds only within the elastic limit — beyond it, permanent deformation occurs. Use the simulator above to stretch the spring, watch F–x plot in real time, and compare series vs parallel configurations.

A 5 N Spring, a 0.05 m Stretch — The Cleanest Possible Worked Example

Set the simulator to a single spring with k = 100 N/m. Hang a 0.5 kg mass on it. The whole problem fits on a sticky note:

That energy figure is the one students miss most often. It is not F·x (that would give 0.240 J), because the force only reaches its full value at the final extension — on average through the stretch it is half. Geometrically: the area under the F-x line is a triangle, not a rectangle. I draw that triangle on the board for first-time learners and they remember the factor of one half forever.

A Common Misconception Worth Killing Early

Students sometimes say “a stiffer spring stretches less” as if stiffness causes the smaller stretch directly. The clearer statement is: a stiffer spring needs more force to produce the same stretch, so for a given load (like gravity pulling on a mass), it ends up stretched less. The cause is the load not changing; the result is the smaller extension.

Run the simulator with k = 50, 100 and 200 N/m for the same 1 kg mass. Extensions come out as roughly 196 mm, 98 mm, 49 mm — exactly halving each time the stiffness doubles. The simulator’s F-x line gets steeper too. Same load, different gradients, different equilibrium points.

Where Hooke Stops Being Hooke — The Elastic Limit

Push past the elastic limit and the force-extension line stops being straight. Three regimes you can see in the simulator’s extended-load mode:

  1. Elastic region (Hookean). F = kx exactly. Load and unload — the spring returns to its natural length. This is everything I have described above.
  2. Yielded but not broken. The line bends but the spring still pulls back, just not as much. Unload and the spring stays partially stretched. Real coil springs above their proof load behave this way.
  3. Plastic and approaching break. The line goes nearly flat — the spring stretches under barely-increasing load. The next small extension snaps it. In a workshop, this is what happens when you over-tension a valve spring once too often.

For an extension simulator like this, the elastic limit is shown as a dashed red line. Stay left of it and Hooke holds. Cross it and the simulator switches into the non-linear regime so you can see the deviation.

Where Hooke’s Law Shows Up Beyond Springs

The Hookean form — restoring force linear in displacement — appears everywhere small displacements matter. You don’t think of these as “springs” but they all obey F = kx for small enough x:

Force-Extension Graphs & Energy

A force-extension graph for a spring obeying Hooke’s Law is a straight line through the origin with gradient k. The area under the graph equals the elastic potential energy stored: Ep = ½kx². This energy can be fully recovered when the spring returns to its natural length (within the elastic limit). The simulator above lets you see this energy area grow in real time as you increase the load.

Series & Parallel Spring Combinations

When springs are placed in series (end to end), the effective spring constant is lower than either individual spring: 1/keff = 1/k1 + 1/k2. In parallel (side by side), the stiffness adds up: keff = k1 + k2. Toggle between configurations in the simulator to see the difference in extension for the same load.

How to Use This Tool

The tool opens in Experiment mode, which is the Hooke’s law experiment itself: choose a spring, step the picker to the slotted mass you want, press Add, let it steady, and read the extension off the rule through the ×10 magnifier. Remove takes the last mass back off; Reset takes every mass off and clears the readings and graph for a fresh run on the same spring; CSV exports your readings for a lab report. Two or more elastic points and the tool fits the line and reports k from its gradient against the true value.

In Simulate mode, drag the weight or use the sliders/steppers to apply force. Watch the F–x graph plot in real time and the live equation overlay update. Toggle SI / Imperial for an imperial bench and imperial units, open Show Calculations for the full derivation in classical math notation, or right-click the canvas to export CSV/PNG. Explore holds the concept cards, Practice generates random problems and Quiz tests your understanding with 5 questions.

The Loading Experiment — Finding k From a Graph, Not a Single Reading

Experiment mode reproduces the classic school and college lab: choose a spring from the rack (A — fine, k = 15.076 N/m; B — medium, k = 27.000 N/m; C — stiff, k = 46.265 N/m, all three derived from Shigley’s spring equations for real wire and coil geometry), then hang the slotted masses one at a time. The masses are the ones a laboratory actually owns: brass discs with a bore and a radial slot so they slide onto the hanger without unhooking it, in 10 g steps from 10 g to 100 g, each one drawn with its real thickness — a 100 g mass is 8.4 mm of brass and a 10 g one only 0.8 mm, which is why the stack on the hanger tells you what is on it at a glance. Pick the denomination with the [−] [value] [+] control, and Remove takes off the last mass you added, exactly as a hand would. Switch to Imperial and the bench changes rather than the labels: an avoirdupois set (¼, ½, 1, 2, 4 oz — the binary series a Class F slotted set is built from) read against an inch rule graduated in sixteenths.

After each mass is added the run controller lets the spring steady, then reads the extension off the rule — through a magnified window — to the nearest millimetre, or the nearest sixteenth of an inch on the imperial bench, exactly as you would with your own eye against a scale in a real lab. Every reading is added as a row to the results table and plotted as a point on the F–x graph.

The spring constant is then read off as the gradient of the best-fit line through those points, not calculated from any one point. That matters: a single F/x reading carries the full rounding error of that one measurement, while the gradient of a line fitted through many points lets the errors partly cancel. Reading to the nearest millimetre costs about 0.1 % on the recovered k for these springs — small, but not zero, and the tool reports the exact figure alongside the fitted value rather than pretending the reading is perfect.

Keep adding masses and, on every spring in the rack, you will eventually cross the elastic limit (2.857 N on Spring A, 5.752 N on Spring B, 11.092 N on Spring C). Past that point the F–x line bends onto a shallower, plastic gradient, and points beyond the limit are automatically excluded from the fit — including them would change the answer, which is exactly why they are left out. Unload the spring afterwards and it does not return to its original length: it keeps a permanent set, the same way an overloaded valve spring or an over-stretched luggage strap stays a little longer than it started. Reset fetches a fresh, undamaged spring so you can run the experiment again.

One thing worth being honest about. A real spring, once released, does not stop moving straight away — it oscillates, and at a realistic damping ratio it can ring for the better part of a minute (around 49 seconds for a rack spring loaded with a typical mass) before it is still enough to read. That is not something you can sit and watch in a simulator, so after each mass is hung the display simply reports “steadying…” and settles within a second or two — deliberately faster than the real physics, in the same way you would cup the mass in your hand for a moment in the real lab rather than wait out the ringing. No reading is ever taken from the moving spring; every value in the table and on the graph comes from the settled, at-rest position, and the wording says “steadying” rather than inventing a story about air resistance or friction to justify the speed. What is physical, and worth checking for yourself, is the natural frequency: a spring genuinely rings at ωn = √(k/m), so if you time the free oscillation of a loaded spring with a stopwatch, the period you measure should match T = 2π√(m/k) for that spring’s k and the mass you hung on it.

Spring Constant k and Young’s Modulus E — the Same Law at Two Scales

The experiment above measures k, the stiffness of one particular spring. Change the wire, the coil diameter or the number of turns and k changes with it — k is a property of the object, not of the material it is made from. Young’s modulus E is the material property underneath it: the same proportionality between force and deformation, written so that the geometry divides out.

For a straight bar of cross-sectional area A and original length L pulled in tension, the two are related exactly:

k = EA / L   (N/m)   because   σ = E ε, with σ = F/A and ε = x/L

Worked example. A steel rod, E = 200 GPa, 2 m long, 10 mm diameter (A = 78.5 mm² = 7.85 × 10⁻⁵ m²). Then k = EA/L = (200 × 10⁹ × 7.85 × 10⁻⁵) / 2 = 7.85 × 10⁷ N/m. Hang 100 kg on it and it stretches x = F/k = 981 / 7.85 × 10⁷ = 0.0125 mm. The same F = kx you plotted with slotted masses, on a body a hundred million times stiffer.

This is why a helical spring is soft while the steel it is wound from is not: coiling turns the wire’s torsion into the spring’s extension, and the spring’s k works out as k = Gd⁴/(8D³n) — the shear modulus G, the wire diameter d, the coil diameter D and the number of active coils n. Same material, geometry doing the work.

You can measure G on this page. Take five or more readings below the elastic limit and press Find Modulus: the tool fits the gradient, inverts k = Gd⁴/(8D³n) to give G = 8kD³n/d⁴, and reports it against the material’s published value — typically within a few tenths of a percent. Young’s modulus is then offered as E = 2G(1+ν) with ν stated, and labelled as derived rather than measured, because a spring cannot tell you Poisson’s ratio.

The practical difference for an experiment: a Hooke’s law spring test gives you one number, k, in N/m, and it belongs to that spring. A tensile test gives you E in GPa, and it belongs to the material — which is why E is what a datasheet quotes. To measure E rather than k, you need a specimen of known area and length and a machine that can load it: that is the UTM tensile testing simulator, and the slope of the elastic part of the curve it draws is exactly what the stress–strain curve tool reports as Young’s modulus. A fuller derivation of the k ↔ E relationship, including where the atomic-scale form k = EA/L comes from, is in the Hooke’s law and spring constant guide.

Hooke’s Law & Spring Formulas

PropertyFormulaUnit
Hooke’s LawF = k × xN
Spring Constantk = F / xN/m
Elastic Potential EnergyPE = ½ k x²J
Springs in Series1/keff = 1/k1 + 1/k2N/m
Springs in Parallelkeff = k1 + k2N/m
Natural Frequency (mass-spring)f = (1/2π) √(k/m)Hz

Typical Spring Constants by Application

ApplicationApprox. k (N/m)Material
Ballpoint pen spring100 – 300Music wire
Screen door spring500 – 1 500Galvanised steel
Automotive valve spring15 000 – 50 000Chrome vanadium
Car suspension spring20 000 – 60 000Chrome silicon
Industrial die spring50 000 – 200 000Alloy tool steel
Railroad buffer spring500 000+High-carbon steel

Frequently Asked Questions

How do you find the spring constant from a graph? Plot the applied force F on the vertical axis against the measured extension x on the horizontal axis, using only the readings taken within the spring’s elastic limit. Because F = kx is a straight line through the origin, k is the gradient of that line — rise over run — found by fitting the best straight line through every plotted point, not by dividing one single F by its x. Using the gradient rather than one reading matters because it spreads the rounding error from reading the rule out across every point instead of trusting just one: with a rule read to the nearest millimetre, the gradient method typically recovers k to within about 0.1 % of its true value, which the Experiment mode above reports directly once you have enough points on the graph.

What is the difference between the spring constant and Young’s modulus? The spring constant k describes one particular object and is measured in N/m: change the wire, the coil diameter or the number of turns and k changes with it. Young’s modulus E describes the material and is measured in GPa — the same force–deformation proportionality with the geometry divided out. For a straight bar of area A and original length L the two are related exactly by k = EA/L, because σ = Eε with σ = F/A and ε = x/L. A Hooke’s law spring test therefore gives you k for that spring, while a tensile test on a specimen of known area and length gives you E for the material — which is what a datasheet quotes.

What happens if you stretch a spring past its elastic limit? Below the elastic limit, Hooke’s Law holds exactly and the spring returns to its original length every time it is unloaded. Push it past that limit and the spring starts to deform plastically: the force-extension line bends onto a shallower gradient, meaning it now takes progressively more force to stretch it the same extra amount. Unload it after that and it does not spring all the way back — it keeps a permanent set, coming to rest at a length longer than it started. The spring is not broken, but it is now a slightly different, weaker spring than the one you began with, which is why it is never included in the gradient fit for k.

Explore Related Simulators

If you found this Hooke’s Law simulator helpful, explore our Spring Design simulator, Stress–Strain Curve simulator, Simple Harmonic Motion simulator, Universal Testing Machine simulator, and Simple Pendulum simulator, and the Spring-Mass-Damper vibration simulator, which takes the same spring constant k and shows the natural frequency and damping it produces,, and our Tuning Fork simulator for more hands-on practice.

Updated