Pendulum frequency calculator
A 1 m pendulum under standard gravity swings about 0.5 times per second, roughly once every two seconds, and this calculator gives the exact hertz with period and angular frequency. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Length
- 1
- Gravity
- 9.80665
- Frequency hz
- 0.4984027953
- Period s
- 2.0064092926
- Angular frequency rad s
- 3.1315571207
- Approximation
- small_angle
A simple pendulum is a point mass hanging from a massless string or rod that swings under constant gravity. For small angles the motion is simple harmonic, and the oscillation frequency depends only on length and gravitational acceleration — not on the bob mass and not on how far you pull the mass back. This pendulum frequency calculator applies the closed-form result f equals one over two pi times the square root of gravity over length, and returns that frequency in hertz together with the matching period and angular frequency. Use it when a lab sheet, game timer, sensor check, or teaching demo needs cycles per second instead of seconds per cycle. Length must be a positive finite number; a zero length is rejected because dividing by length inside the square root is undefined.
What pendulum frequency means and which formula this page uses
Frequency is how many complete swings a pendulum completes in one second. If you watch a long-case clock, a playground swing, or a hanging lamp, the number you usually quote is the period — seconds per cycle — but many instruments, games, and control loops want the reciprocal: cycles per second, written in hertz. Under the small-angle approximation the pendulum equation linearizes, the restoring torque is proportional to angle, and the motion is simple harmonic with a natural frequency that depends only on length L and gravity g.
The closed form is f equals one over two pi times the square root of g over L. Equivalently, the angular frequency omega equals the square root of g over L, and ordinary frequency is omega divided by two pi. Mass cancels in the derivation, and amplitude disappears once sine of theta is replaced by theta in radians, so a heavy bob and a light bob on the same string tick at the same rate in this model.
Real hardware still has air drag, a finite bob, a stretching string, and large swings that lower the true frequency; this tool deliberately returns the ideal small-angle hertz 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 — Earth standard 9.80665, a lab-measured g, or another body such as the Moon.
Where a pendulum frequency calculator earns its keep
Physics teachers and lab assistants use a pendulum frequency calculator to prepare expected hertz values before students count swings against a stopwatch or a photogate. Game and animation engineers need a transparent frequency when a hanging lamp, wrecking ball, or metronome should feel physically plausible at a given rope length and world gravity, without hand-tuning a timer that later drifts. IoT and instrumentation groups compare measured zero-crossing rates against the ideal f to flag damping, friction, a wrong effective length, or a mis-set gravity constant in firmware.
Failed validation does not consume balance. Keep this page when the search intent is pendulum frequency in hertz; a period-first landing answers seconds per cycle, and a length landing answers how long the string must be. Those are neighboring questions with different queries, and this capability stays focused on f so the result, the title, and the examples all speak cycles per second.
Prefer a numerical ODE solver only when you leave the small-angle model — large amplitudes, compound pendulums, and distributed mass need different equations and richer geometry than two scalars.
What you can do with it
Classroom and lab expected hertz
Generate the ideal small-angle frequency for a given string length and local g before students count swings and compute percent error in cycles per second.
Game and animation timing
Set rope length and world gravity so hanging props, wrecking balls, and metronomes cycle at a predictable frequency in hertz without hand-tuned timers.
Sensor and firmware checks
Compare photogate or encoder swing rates against f = (1/2π)√(g/L) to detect excess damping, a wrong effective length, or a mis-set gravity constant.
FAQ
What formula does the pendulum frequency calculator use?
It uses the small-angle result f = (1/(2π)) √(g/L), where L is length in meters and g is gravitational acceleration in m/s². Frequency is returned in hertz, with period and angular frequency included for audit.
Does the frequency 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 frequency formula implemented here.
What happens if I send a zero length?
A pendulum of zero length has no defined oscillation frequency because the formula divides by L under a square root. Failed tasks are not charged.
Is this valid for large swing angles?
No. Large amplitudes need elliptic integrals or numerical integration and the true frequency drops as amplitude grows. This capability returns the standard small-angle closed form only, which is the usual first-order lab and textbook baseline.
How do I get the period from the frequency?
The period is the reciprocal of the frequency: one divided by the value in hertz. The calculator returns both, along with the angular frequency, so you do not need to convert by hand.
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/pendulum-frequency \
-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/pendulum-frequency", {
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/pendulum-frequency",
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/pendulum-frequency", 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/pendulum-frequency", 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.pendulum_frequency",
"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
What pendulum frequency means and which formula this page uses
Zero length is not a physical pendulum: the formula divides by L under a square root, so the request is rejected instead of inventing an infinite frequency.
Inputs, outputs, units, and why a zero length fails
Send two numbers: length in meters and gravity in meters per second squared. Both must be finite and strictly greater than zero. A one-meter pendulum under standard Earth gravity returns a frequency near one half hertz, which is a useful sanity check when wiring clients — about one full cycle every two seconds. If you only know centimeters or inches, convert to meters before calling; if you work in g-force multiples, convert to absolute meters per second squared first. Aliases L and pendulum_length for length, and g and g_ms2 for gravity, are accepted so spreadsheets and typed forms can reuse the same contract. The response echoes length and gravity, then frequency_hz as the primary result in hertz, period_s as the reciprocal in seconds, angular_frequency_rad_s in radians per second, the formula string f equals one over two pi times the square root of g over L, and an approximation tag small_angle for audit logs. Rounding is fixed to twelve decimal places so browser and API results match byte-for-byte on the same inputs. Missing fields, non-finite values, negative length, non-positive gravity, and especially a length of exactly zero fail fast with invalid_input naming the field. Those failed tasks are not charged. Prefer this endpoint when the quantity you need is frequency in hertz; if you instead need to design a string for a target period, use a length-from-period helper rather than inverting by hand in every client.
Where a pendulum frequency calculator earns its keep
Documentation writers embed the API in interactive guides so readers can try their own L and g without leaving the page and without pasting a spreadsheet formula. Because each successful call is a single analytic item priced at $0.002, batch scripts can recompute tables of frequencies across lengths or planetary gravities without a subscription or model cost.
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.