Seconds pendulum length calculator
Under standard Earth gravity of 9.80665 m/s², a pendulum that takes one second per swing and two per full cycle needs a length close to one metre. Enter your local gravity to get the ideal length for your site. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Gravity
- 9.80665
- Period seconds
- 2
- Length metres
- 0.9936213856
- Model
- ideal simple pendulum at small amplitude
A seconds pendulum completes one full oscillation in two seconds, taking one second to swing from one side to the other. This calculator returns its ideal length for a supplied gravitational acceleration. Enter gravity in metres per second squared and receive the corresponding length in metres from the small-angle simple-pendulum model. The calculation is deterministic, uses no network service, and rejects missing, non-finite, zero, or negative gravity instead of returning a physically meaningless result.
How the two-second period determines length
A seconds pendulum has a full period of exactly two seconds: each half-swing lasts one second. The calculator evaluates that closed form directly. When gravity is expressed in metres per second squared, the returned length is in metres.
Bob mass does not appear because, in this ideal model, mass does not affect the period. The result assumes a point-like bob, a massless inextensible suspension, uniform gravity, negligible air resistance, negligible pivot friction, and a sufficiently small swing angle. Those assumptions make the value a reference length rather than a complete clock-building specification.
The fixed period also distinguishes this tool from a general pendulum length calculator: users provide gravity only, while the two-second period is part of the definition being evaluated.
Choosing and validating the gravity input
Provide gravity as one finite number greater than zero. For standard calculations, a conventional Earth value produces a length close to one metre, but local gravitational acceleration varies with latitude, elevation, and geological conditions. Use a locally measured or authoritative site value when the small differences matter, especially for a precision instrument or a laboratory comparison.
The input contract uses metres per second squared, so a value expressed in centimetres per second squared must be converted before submission. The calculator does not guess units or silently replace an invalid value with an Earth default. Zero and negative gravity are rejected because the ideal pendulum equation would not describe an ordinary restoring oscillation under those conditions.
Interpreting the result in clocks and experiments
Treat the calculated length as the ideal effective length, measured from the pivot to the bob's centre of mass, not merely as the visible string length. A real clock must account for the suspension spring, rod or cord mass, bob geometry, pivot behaviour, temperature expansion, air buoyancy, drag, and the finite amplitude of the swing. Large amplitudes lengthen the actual period relative to the small-angle prediction, while mechanical losses require an escapement or another energy source to sustain motion.
For a classroom experiment, measure the effective length consistently and time many cycles to reduce reaction-time error. For clock design, use this result as the initial geometry and then regulate the assembled mechanism against a reliable time reference. A lower positive gravity produces a proportionally shorter seconds pendulum, and a higher positive gravity produces a proportionally longer one because L = g/π² is linear in g.
What you can do with it
Clock design starting point
Find the ideal effective length for a two-second pendulum before allowing for the bob, suspension, escapement, and regulation hardware.
Physics laboratory reference
Compare a measured pendulum length with the theoretical seconds-pendulum length under the laboratory's local gravitational acceleration.
Gravity comparison
Show how the required two-second pendulum length changes proportionally between locations or modeled gravitational environments.
FAQ
Why is it called a seconds pendulum if its period is two seconds?
Each swing from one side to the other takes one second, while a full return to the starting side takes two seconds. Period means the full two-second cycle.
Which formula does the calculator use?
Setting T to two seconds gives L = g/π².
Is the result an exact construction length for a clock?
No. It is the ideal effective length from pivot to bob centre under the small-angle model. Real mechanisms require corrections and final regulation.
Does the mass of the bob change the length of a seconds pendulum?
No. In the ideal pendulum model the mass of the bob does not affect the period, so only gravity decides the length. That is why gravity is the single value you enter.
Why is the seconds pendulum length different from place to place?
Because local gravity changes with latitude, elevation and the ground underneath. For a precision instrument or a lab comparison, use a measured or official value for your site instead of the standard one.
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/seconds-pendulum \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"gravity":9.80665}'const res = await fetch("https://api.kit.forhosting.com/mech/seconds-pendulum", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"gravity": 9.80665
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/mech/seconds-pendulum",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"gravity": 9.80665
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/mech/seconds-pendulum", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"gravity":9.80665}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"gravity":9.80665}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/mech/seconds-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
{
"gravity": 9.80665
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "mech.seconds_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
How the two-second period determines length
The ideal simple-pendulum equation is T = 2π√(L/g), where T is the full period, L is the distance from the suspension point to the bob's centre of mass, and g is gravitational acceleration. Substituting T = 2 and rearranging the equation gives L = g(T/2π)², which simplifies to L = g/π².
Choosing and validating the gravity input
Missing gravity, text that cannot be interpreted as a finite number, NaN, Infinity, zero, and negative acceleration all return an `invalid_input` error. On success, the response echoes gravity, states the fixed period as two seconds, returns `length_metres` as the main result, and includes the formula and model description. This explicit output makes the assumptions easy to preserve in worksheets, scripts, and audit records.
Interpreting the result in clocks and experiments
The API charge for a successful item is $0.002; the browser calculation uses the same deterministic logic. This capability does not calculate large-angle corrections, physical-pendulum moments of inertia, compound pendulums, damping, or escapement dynamics. Those require additional measurements and different models beyond the defined seconds-pendulum reference calculation.
Technical questions
What units should gravity use?
Enter gravity in metres per second squared. The resulting `length_metres` value is then expressed in metres.
What happens when gravity is zero or negative?
The request returns an `invalid_input` error because ordinary pendulum oscillation in this model requires positive gravitational acceleration.