Frequency from period calculator
A period of 0.25 gives a frequency of 4, because four full cycles fit into one unit; a period of 4 gives 0.25. The result is in cycles per unit of whatever you measured, and zero or negative periods are refused. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Period
- 0.25
- Frequency
- 4
- Frequency unit
- cycles per unit interval
Frequency tells you how many complete cycles of a repeating function occur within one unit of its independent variable. If the period T is the interval required for exactly one cycle, frequency is its reciprocal: f equals one divided by T. Enter any positive finite period and this calculator returns the corresponding number of cycles per unit interval. The interval may represent seconds, radians, meters, frames, or another consistent unit; the result uses the reciprocal of whatever unit you chose. The calculation is deterministic, runs without a network call, and rejects zero or negative periods rather than returning an undefined or misleading value.
Understand frequency as the reciprocal of period
A periodic function repeats the same pattern after a fixed horizontal distance called its period. Denote that distance by T. During an interval of length T, the function completes one cycle, so during one unit interval it completes one divided by T cycles.
A period of 4 produces a frequency of 0.25 cycles per unit interval because only one quarter of a cycle fits into each unit. A period of 0.25 produces a frequency of 4 because four complete cycles fit into one unit. This reciprocal relationship also explains the direction of change: increasing the period decreases frequency, while decreasing the period increases frequency.
The calculator requires a positive period because period normally describes a positive length. A zero period would require division by zero, and a negative length does not represent the size of a repeating interval. The output retains the supplied period, the computed frequency, a descriptive frequency unit, and the formula used, making the result suitable for a worksheet, UI, or automated check.
Choose one interval unit and interpret the result consistently
The reciprocal formula works with any interval unit as long as the input and interpretation remain consistent. If T is measured in seconds, the returned frequency is cycles per second, commonly called hertz. If T is measured in milliseconds, the raw reciprocal is cycles per millisecond; multiply that value by one thousand only if you want cycles per second.
For a graph whose horizontal axis is meters, a period of two meters yields one half cycle per meter. For an animation whose independent variable is frames, a period of thirty frames yields one thirtieth of a cycle per frame. This capability intentionally reports the general label cycles per unit interval instead of guessing what your unit means.
That prevents a mathematically correct reciprocal from being mislabeled as hertz when the period was supplied in degrees, samples, meters, or another domain. Before calling, normalize all data points to the same chosen unit. Numeric strings with a standard decimal or scientific notation are parsed, while empty text, nonnumeric values, arrays, objects, NaN, and Infinity are rejected.
Apply the result to periodic functions and avoid common mistakes
Frequency from period appears whenever a function repeats: sine and cosine graphs, rotating patterns, clock signals, sampled animations, seasonal models, and spatial waves all have a cycle length that can be inverted. For a sinusoid written with a visible period T, this calculator gives the ordinary cycle frequency, not angular frequency. Angular frequency uses radians per interval and equals 2πf, so do not confuse the two quantities or omit the factor of 2π in a formula that explicitly asks for omega.
Another frequent mistake is changing units after taking the reciprocal without adjusting the result. A period of 20 milliseconds has a reciprocal of 0.05 cycles per millisecond, which is equivalent to 50 cycles per second; calling the first number 0.05 hertz would be wrong. Extremely small periods create large frequencies, so this implementation publishes a lower accepted period of 10^-12 and an upper accepted period of 10^12.
Treat measurement precision honestly as well: the calculator cannot add accuracy that the period measurement did not contain. Use the returned value as a direct deterministic transformation, then round for display according to the needs of your subject, instrument, or report.
What you can do with it
Analyze a periodic graph
Convert the horizontal distance between repeated peaks into the number of cycles completed per axis unit.
Check oscillator timing
Turn a measured cycle duration into cycles per matching time unit before comparing observed and expected behavior.
Configure repeating animation
Convert a loop length in frames or seconds into the cycle rate needed by an animation formula.
FAQ
What units does the result use?
The result is cycles per unit interval. Seconds produce cycles per second, meters produce cycles per meter, and frames produce cycles per frame.
Can the period be zero or negative?
No. Zero makes the reciprocal undefined, and a negative number is not accepted as the length of a period.
Is frequency the same as angular frequency?
No. This tool returns ordinary frequency f in cycles per unit. Angular frequency is 2πf radians per unit.
What is the frequency for a period of 0.25?
It is 4 cycles per unit interval, because four complete cycles fit into one unit. The calculator divides 1 by the period, so a period of 4 gives the opposite result, 0.25.
How do I get hertz from a period in milliseconds?
Enter the period in milliseconds to get cycles per millisecond, then multiply that result by one thousand to get cycles per second, which is hertz. Convert all your data to one unit first.
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/trig/frequency-from-period \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"period":0.25}'const res = await fetch("https://api.kit.forhosting.com/trig/frequency-from-period", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"period": 0.25
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/trig/frequency-from-period",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"period": 0.25
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/trig/frequency-from-period", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"period":0.25}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"period":0.25}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/trig/frequency-from-period", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"period": 0.25
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "trig.frequency_from_period",
"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
Understand frequency as the reciprocal of period
That count is the frequency f, giving the compact relationship f = 1/T. Both cases return an invalid_input error instead of Infinity or a signed result that could be mistaken for an ordinary cycle count.
Choose one interval unit and interpret the result consistently
Then send one JSON field named period; aliases T and cycle_length are also accepted.
Apply the result to periodic functions and avoid common mistakes
Those finite bounds keep reciprocal output stable and useful across the browser and API.
Technical questions
What formula converts period to frequency?
Use f = 1/T, where T is the positive period and f is the number of cycles per matching unit interval.
How much does the calculator cost?
The browser calculator is free. Each successful API request costs $0.002; invalid input is rejected.