{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"hookes-law"},"result":{"entity_type":"calculator","id":"hookes-law","calculator_id":"hookes-law","canonical_url":"https://tttkmbb.com/physics/hookes-law","name":"Hooke's Law Calculator","title":"Hooke's Law Calculator – Spring Force F = k·x, Elastic Energy and Oscillation Period","category":"physics","category_name":"Physics","tool_name":"calculate_hookes_law","featured_mcp_tool":false,"description":"Computes the restoring force of a linear spring and the elastic potential energy stored at a given displacement, plus the natural period and frequency of a mass on that spring when a mass is supplied.","use_when":"You know a spring constant and how far the spring is stretched or compressed and need the force or stored energy, or the oscillation period of a spring–mass system.","do_not_use_when":"The spring is loaded beyond its elastic (linear) limit, or you need gravitational energy (use potential-energy) or a pendulum's period (use pendulum).","inputs":[{"name":"spring_constant_n_m","label":"Spring constant","type":"number","unit":"N/m","required":true,"exclusive_min":0,"description":"Stiffness k in newtons per metre.","example":200},{"name":"displacement_m","label":"Displacement","type":"number","unit":"m","required":true,"description":"Extension (positive) or compression (negative) from the natural length, in metres (1 cm = 0.01 m).","example":0.05},{"name":"mass_kg","label":"Attached mass","type":"number","unit":"kg","required":false,"exclusive_min":0,"description":"Optional mass on the spring; enables the oscillation period and frequency outputs.","example":0.5}],"outputs":[{"name":"force_n","label":"Spring force","type":"number","unit":"N","decimals":4,"description":"Magnitude of the restoring force |k × x|, directed back toward the natural length."},{"name":"elastic_potential_energy_j","label":"Elastic potential energy","type":"number","unit":"J","decimals":4,"description":"U = ½ × k × x²."},{"name":"period_s","label":"Oscillation period","type":"number","unit":"s","decimals":4,"description":"T = 2π√(m / k) (only when mass_kg is given)."},{"name":"frequency_hz","label":"Oscillation frequency","type":"number","unit":"Hz","decimals":4,"description":"f = 1 / T (only when mass_kg is given)."}],"input_schema":{"type":"object","properties":{"spring_constant_n_m":{"description":"Stiffness k in newtons per metre. Unit: N/m.","type":"number","exclusiveMinimum":0,"examples":[200],"x-unit":"N/m"},"displacement_m":{"description":"Extension (positive) or compression (negative) from the natural length, in metres (1 cm = 0.01 m). Unit: m.","type":"number","examples":[0.05],"x-unit":"m"},"mass_kg":{"description":"Optional mass on the spring; enables the oscillation period and frequency outputs. Unit: kg.","type":"number","exclusiveMinimum":0,"examples":[0.5],"x-unit":"kg"}},"additionalProperties":false,"required":["spring_constant_n_m","displacement_m"]},"output_schema":{"type":"object","properties":{"force_n":{"description":"Magnitude of the restoring force |k × x|, directed back toward the natural length. Unit: N.","type":"number","x-unit":"N"},"elastic_potential_energy_j":{"description":"U = ½ × k × x². Unit: J.","type":"number","x-unit":"J"},"period_s":{"description":"T = 2π√(m / k) (only when mass_kg is given). Unit: s.","type":"number","x-unit":"s"},"frequency_hz":{"description":"f = 1 / T (only when mass_kg is given). Unit: Hz.","type":"number","x-unit":"Hz"}}},"formula":"force_n = spring_constant_n_m × |displacement_m|; U = ½ × spring_constant_n_m × displacement_m²; T = 2π × √(mass_kg / spring_constant_n_m); f = 1 / T","method":"Ideal massless linear spring (Hooke's law holds only within the elastic limit); the period formula ignores damping and the spring's own mass.","sources":[{"name":"HyperPhysics – Elastic potential energy","url":"http://hyperphysics.phy-astr.gsu.edu/hbase/pespr.html","type":"reference","retrieved_at":"2026-09-23"},{"name":"Wikipedia – Hooke's law","url":"https://en.wikipedia.org/wiki/Hooke%27s_law","type":"reference","retrieved_at":"2026-09-23"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"k = 200 N/m stretched 5 cm with 0.5 kg","inputs":{"spring_constant_n_m":200,"displacement_m":0.05,"mass_kg":0.5},"expected":{"force_n":10,"elastic_potential_energy_j":0.25,"period_s":0.3142,"frequency_hz":3.1831},"url":"https://tttkmbb.com/api/v1/calculate/hookes-law?spring_constant_n_m=200&displacement_m=0.05&mass_kg=0.5"},{"name":"k = 5000 N/m compressed 12 cm","inputs":{"spring_constant_n_m":5000,"displacement_m":-0.12},"expected":{"force_n":600,"elastic_potential_energy_j":36},"url":"https://tttkmbb.com/api/v1/calculate/hookes-law?spring_constant_n_m=5000&displacement_m=-0.12"}],"faq":[{"q":"How do I find the spring constant?","a":"Hang a known mass and measure the extension: k = m·g / x. For example 0.5 kg stretching a spring 2.45 cm gives k = 0.5 × 9.80665 / 0.0245 ≈ 200 N/m."},{"q":"Does the sign of the displacement matter?","a":"Only for direction; the force magnitude and the stored energy are the same for equal stretch or compression."}],"tags":["hooke's law","spring force","spring constant","elastic potential energy","spring oscillation"],"related":[{"calculator_id":"pendulum","reason":"Period of a pendulum oscillator."},{"calculator_id":"potential-energy","reason":"Gravitational rather than elastic stored energy."},{"calculator_id":"newtons-second-law","reason":"Force from mass and acceleration."}],"links":{"html":"https://tttkmbb.com/physics/hookes-law","markdown":"https://tttkmbb.com/physics/hookes-law.md","json":"https://tttkmbb.com/physics/hookes-law.json","api":"https://tttkmbb.com/api/v1/calculate/hookes-law","schema":"https://tttkmbb.com/api/v1/calculators/hookes-law","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-23"},"timestamp":"2026-09-23T23:27:44Z"}