Simple pendulum period
A 1 m pendulum under standard gravity of 9.80665 m/s² takes close to two seconds for a full swing there and back. Enter length and gravity to get the small-angle period, frequency and angular frequency, the textbook baseline for your stopwatch. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Pendulum length in meters
- 1
- Gravitational acceleration in m/s²
- 9.80665
- Length m
- 1
- Gravity m s2
- 9.80665
- Period s
- 2.0064092926
- Frequency hz
- 0.4984027953
A simple pendulum is a point mass on a massless string or rod swinging under constant gravity. For small angles the motion is simple harmonic, and the oscillation period depends only on length and gravitational acceleration—not on mass or amplitude. Use it for lab checks, classroom demos, game physics, sensor calibration, and any workflow that needs a deterministic small-angle period without spreadsheet formulas or ad-hoc scripts.
What the simple-pendulum period formula assumes
Under that approximation the restoring torque is proportional to angle, so the system behaves like a harmonic oscillator whose natural period depends only on length L and gravity g. Mass cancels out of the derivation, and amplitude disappears once sin(θ) is replaced by θ in radians. Real hardware still has air drag, finite bob size, stretching strings, and large swings that stretch the period; this tool deliberately returns the ideal small-angle value so you can compare experiment against theory, seed a simulation, or document the textbook baseline.
Length must be the pivot-to-center-of-mass distance in meters, and gravity must be the local acceleration in meters per second squared—use Earth standard 9.80665, a lab-measured g, or another body such as the Moon. Non-positive length or gravity is rejected because the square-root expression is only defined for positive physical inputs.
Inputs, outputs, and units you should send
Send two numbers: length (meters) and gravity (m/s²). Both must be finite and strictly greater than zero. A one-meter pendulum under standard Earth gravity returns a period near two seconds, which is a useful sanity check when wiring clients.
If you only know centimeters or inches, convert to meters before calling; if you work in g-force multiples, convert to absolute m/s² first.
Where teams plug this into real workflows
Physics teachers and lab assistants use the calculator to prepare expected periods before students time swings with a stopwatch. Game and animation engineers need a transparent period when a hanging lamp, wrecking ball, or metronome should feel physically plausible at a given rope length. IoT and instrumentation groups compare measured zero-crossing times against the ideal T to flag damping, friction, or setup error.
What you can do with it
Classroom and lab expected values
Generate the ideal small-angle period for a given string length and local g before students measure swing times and compute percent error.
Game and animation physics
Set rope length and world gravity so hanging props, pendulums, and metronomes cycle at a predictable period without hand-tuning timers.
FAQ
What formula does the simple pendulum period calculator use?
Period is returned in seconds along with frequency and angular frequency.
Does the period depend on the mass of the bob?
Not in the ideal simple-pendulum model. Mass cancels in the derivation, so only length and gravity enter the formula implemented here.
What happens if I send a zero or negative length?
Length and gravity must both be finite numbers strictly greater than zero; failed tasks are not charged.
Is this valid for large swing angles?
No. Large amplitudes need elliptic integrals or numerical integration. This capability returns the standard small-angle closed form only, which is the usual first-order lab and textbook baseline.
What length should I measure for a simple pendulum?
Measure from the pivot to the centre of mass of the bob, in metres. If your ruler shows centimetres or inches, convert to metres first so the period comes out in seconds.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/mech/simple-pendulum \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"length":1,"gravity":9.80665}'const res = await fetch("https://api.kit.forhosting.com/mech/simple-pendulum", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"length": 1,
"gravity": 9.80665
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/mech/simple-pendulum",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"length": 1,
"gravity": 9.80665
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/mech/simple-pendulum", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"length":1,"gravity":9.80665}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"length":1,"gravity":9.80665}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/mech/simple-pendulum", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"length": 1,
"gravity": 9.80665
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "mech.simple_pendulum",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
This capability applies the classic formula T equals two pi times the square root of length over gravity, returning period, frequency, and angular frequency as clean JSON.
What the simple-pendulum period formula assumes
The closed-form period T = 2π √(L/g) comes from linearizing the pendulum equation of motion for small angular displacements.
Inputs, outputs, and units you should send
The response echoes length_m and gravity_m_s2, then period_s (seconds per full cycle), frequency_hz (cycles per second), angular_frequency_rad_s (radians per second), and the formula string for audit logs. Rounding is fixed to twelve decimal places so browser and API results match byte-for-byte on the same inputs. Invalid or missing fields fail fast with invalid_input and are not charged.
Where teams plug this into real workflows
Documentation writers embed the API in interactive guides so readers can try their own L and g without leaving the page. Because each successful call is a single analytic item priced at $0.002, batch scripts can recompute tables of periods across lengths or planetary gravities without a subscription or model cost. Prefer this endpoint when you want a stable, reviewable formula—not a numerical ODE solver for large-amplitude motion, compound pendulums, or physical pendulums with distributed mass, which need different equations and richer input geometry.
Integration use cases
Sensor and instrument checks
Compare stopwatch or encoder periods against T = 2π√(L/g) to detect excess damping, wrong effective length, or mis-set gravity in firmware.
Technical questions
How much does each API call cost?
$0.002 per successful request. The browser tool above runs free locally; the API draws from your prepaid KIT balance only when the task succeeds.