Frequency of light calculator
A 1-metre wavelength in vacuum gives 299,792,458 Hz, and a 500 nm green line comes out near 6 × 10^14 Hz, the scale of visible light. Enter metres, or a slower speed for light in glass. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Wavelength
- 1
- Speed of light
- 299,792,458 Hz
- Frequency
- 299,792,458
- Precision
- 10
This frequency of light calculator returns the electromagnetic frequency in hertz from a wavelength and the speed of light using the monochromatic relation f equals c over lambda. Frequency is how many oscillations pass a fixed point each second; when the speed of light is in metres per second and wavelength is in metres, the result is exactly in hertz. A zero or negative wavelength is rejected because division by a non-positive length is undefined. Typical checks include one metre of vacuum wavelength for two hundred ninety-nine million seven hundred ninety-two thousand four hundred fifty-eight hertz, and five times ten to the minus seven metres (five hundred nanometres) for a visible green-scale frequency.
Where frequency-of-light calculations fit in study, lab work, and software
Students meet f equals c over lambda when a textbook moves from colour charts to photon energy, when a lab quotes a helium-neon line as six hundred thirty-two point eight nanometres and asks for hertz, or when a contest problem gives vacuum wavelength and demands frequency without a calculator under the desk. Teachers can pre-generate answer keys for modest metre inputs without trusting opaque apps that silently switch nanometres and metres or drop scientific notation.
Spectroscopists and optical engineers call the same contract from scripts to seed deterministic test vectors for spectrometers, to normalize user-entered laser wavelengths before plotting optical spectra, or to satisfy programming-challenge statements that demand light frequency rather than a hand-waved colour name. Product and education tools use the relation when a learner types a wavelength in metres and the interface must show hertz with a clean formula reminder next to the vacuum speed of light.
Photonics notebooks convert a design wavelength into frequency before combining it with Planck’s constant for photon energy or with a refractive index for the optical path in glass.
What you can do with it
Homework and spectroscopy checks
Convert a vacuum or medium wavelength in metres into light frequency in hertz before colour charts, laser-line labs, or photon-energy follow-up.
Photonics and education software
Normalize user-entered wavelength and optional speed of light into frequency for interactive lessons, spectrometer UIs, and answer keys.
FAQ
What does the frequency of light calculator cost?
It is free in your browser on this page.
How is the frequency of light defined here?
For speed of light c and wavelength λ with λ > 0, f = c / λ. With SI inputs (m/s and m) the result is in hertz (Hz). Vacuum c defaults to 299792458 m/s when omitted.
What happens if wavelength is zero or negative?
Wavelength ≤ 0 makes f = c / λ undefined (division by a non-positive length).
Do I enter wavelength in nanometres?
Send metres. Convert nanometres by dividing by 1e9 (500 nm → 5e-7 m), micrometres by 1e6, and angstroms by 1e10, then submit that metre value.
Can I use a speed of light other than vacuum c?
Omitting it uses the exact SI vacuum value 299792458 m/s.
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/phys/frequency-of-light \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"wavelength":5e-7}'const res = await fetch("https://api.kit.forhosting.com/phys/frequency-of-light", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"wavelength": 5e-7
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/phys/frequency-of-light",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"wavelength": 5e-7
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/phys/frequency-of-light", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"wavelength":5e-7}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"wavelength":5e-7}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/phys/frequency-of-light", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"wavelength": 5e-7
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "phys.frequency_of_light",
"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.
Limits
max_abs_wavelength | 1000000000000000 |
max_abs_speed_of_light | 1000000000000000 |
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 the light relation means and what the response contains
Every travelling electromagnetic wave that keeps a constant shape at constant speed links three scalars: the speed of light c, the spatial period called the wavelength lambda, and the temporal rate called the frequency f. The identity is simply f equals c divided by lambda, which is the same statement as c equals f times lambda. Physically, if crests of a vacuum electromagnetic wave are spaced one metre apart and the pattern advances at the defined speed of light, about three times ten to the eight crests pass each second. Optical workers usually meet the same identity from the other direction: a five-hundred-nanometre green line is five times ten to the minus seven metres, so dividing vacuum c by that length yields a frequency of about six times ten to the fourteen hertz, the scale of visible light. This calculator takes wavelength and an optional speed of light, validates them as finite numbers inside the documented magnitude ceilings, and returns the rounded inputs, the frequency in hertz under SI assumptions, the precision used, a method tag light_frequency, a short formula string, and the unit label Hz. There is no approximate spectral estimation, no FFT of an optical buffer, and no random sampling of periods: the engine either builds an exact floating-point quotient or rejects the input with invalid_input. Rejected cases include missing wavelength, non-finite values, magnitudes above the ceiling, and any wavelength that is zero or negative, because f equals c over a non-positive length is undefined. If you need photon energy in electronvolts, convert after a successful call with E equals h times f; if you need refractive-index slowdown, pass a reduced speed of light equal to c over n rather than vacuum c.
How wavelength and the speed of light are read and how f stays reproducible
Values must be in metres (or any length unit consistent with the speed you send): convert nanometres by dividing by one billion, micrometres by dividing by one million, and angstroms by dividing by ten billion, then send the metre figure. Optional leading plus signs and scientific notation on numeric strings are allowed when they parse as finite decimals; embedded spaces, hex prefixes, and non-numeric tokens are rejected with a clear message so a bad cell does not become a wrong frequency. The preferred field is wavelength for the spatial period of the light, with aliases lambda, wavelength_m, and L so spreadsheets, query strings, and typed forms can reuse the same contract. Wavelength must be strictly positive: zero and negative lengths fail with invalid_input because division by zero is not a frequency and a negative length is not a physical wavelength. The optional speed_of_light field, with aliases c, c0, wave_speed, speed, and vacuum_speed, defaults to the exact SI vacuum value two hundred ninety-nine million seven hundred ninety-two thousand four hundred fifty-eight metres per second when omitted; supply a smaller positive speed when the light travels in a medium. An optional precision field, with aliases decimals and dp, chooses how many decimal places to expose for wavelength, speed_of_light, and frequency, defaulting to ten and capped at fifteen so JSON goldens stay stable. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing the division yourself.
Where frequency-of-light calculations fit in study, lab work, and software
On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with wavelength or photon-energy helpers when you need related optical steps, and with other physics endpoints when you are building a small lab of free, deterministic calculators.
Integration use cases
Deterministic test fixtures
Generate reproducible f = c / λ values for unit tests, property checks, and CI assertions in optics or photonics simulators.