Photon energy calculator
A photon with a 500 nm wavelength carries nearly 4 × 10⁻¹⁹ joules. Enter a wavelength in metres or a frequency in hertz and get the energy from Planck's relation with exact constants, ready for a lab report or a homework check. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Wavelength
- 0.0000005
- Energy
- 0 J
- Energy j
- 0
- Frequency
- 599,584,916,000,000
- Planck constant
- 0
A photon carries a discrete packet of electromagnetic energy fixed by its frequency, or equivalently by its vacuum wavelength. This photon energy calculator applies Planck's relation E = h f and the identity E = h c / λ, using the exact SI values of Planck's constant and the speed of light, and returns that energy in joules rather than a rounded electronvolt estimate from a textbook table. Send a wavelength in metres, a frequency in hertz, or both when they already satisfy c = λ f.
What E = hf = hc/λ means and why the result is in joules
In vacuum the same energy is equivalently h c divided by the wavelength, because the speed of light ties frequency and wavelength through c = λ f. This calculator uses those two identities and nothing else. Planck's constant is the exact SI value 6.62607015 times ten to the minus thirty-four joule-seconds, fixed by the 2019 redefinition of the SI, not a rounded laboratory estimate you have to look up for each problem.
The speed of light is the exact SI constant 299792458 metres per second. Multiplying those constants and dividing by a wavelength in metres, or multiplying h by a frequency in hertz, yields energy in joules, because a joule is a kilogram metre-squared per second-squared and those are the coherent SI units of h, c, λ, and f.
The numerical size of a visible photon is on the order of a few times ten to the minus nineteen joules, which is why spectroscopy tables often quote electronvolts while the SI energy remains in joules. This capability computes only that SI energy. It does not convert the result into electronvolts, millielectronvolts, or kilocalories, it does not accept nanometres or terahertz as input units, and it does not model a laser pulse energy, a photon flux, or an irradiance.
Those are different search intents served by other tools, including the unit converter that maps eV, nm, and THz onto one another. What you send is a wavelength in metres, a frequency in hertz, or both when they already satisfy the vacuum relation; what you get is E in joules.
Where a photon energy calculator earns its keep, and what it costs
Classrooms and tutoring platforms use a photon energy calculator so learners can check E = h f and E = h c / λ for a stated colour of light or a radio channel without dropping a digit in h or writing 3e8 by habit. Exam generators and LMS plugins need a deterministic oracle that rejects a zero or negative wavelength instead of silently returning Infinity or a negative energy that a buggy grader might treat as success.
Optics pipelines that convert a list of vacuum wavelengths into joules per photon call a tiny parse step instead of pulling a computer-algebra system for a one-line product. Failed validation does not consume balance. Pin the returned joule value in tests, keep requests small, and you get reproducible photon energies for homework, lab notes, and edge workers without standing up symbolic math infrastructure of your own.
The same constants appear in every successful body so a client can log h and c beside the energy rather than assuming a rounded poster value.
What you can do with it
Classroom Planck-relation checks
Let students submit a vacuum wavelength in metres or a frequency in hertz and verify E = hf = hc/λ in joules, including a clear error when the value is zero or negative.
Spectroscopy notebooks and laser-lab widgets
Embed a live photon energy calculator on an optics or spectroscopy page so readers see the SI joule figure for a stated colour of light using exact h and c.
Exam generators and optics pipelines
Mark photon-energy items with a deterministic oracle, or convert a list of vacuum wavelengths into joules per photon in a pipeline without a computer-algebra library.
FAQ
What happens if wavelength or frequency is zero or negative?
Photon energy E = h f = h c / λ requires a strictly positive finite wavelength and frequency; a zero or negative metre or hertz is rejected and is not billed.
Which values of Planck's constant and the speed of light does the calculator use?
They are not rounded 6.63×10⁻³⁴ or 3×10⁸ estimates. Energy is SI joules when wavelength is metres and frequency is hertz.
How much energy does a 500 nm photon have?
Nearly 4 × 10⁻¹⁹ joules. Enter the wavelength as 5 × 10⁻⁷ metres and the calculator also shows the matching frequency, about 6 × 10¹⁴ hertz, next to the energy.
How do I enter a wavelength given in nanometres?
Divide it by one billion first, because the calculator only reads metres. So 500 nm becomes 5 × 10⁻⁷ m. It does not convert nanometres, angstroms or terahertz for you.
Can I get photon energy in electronvolts?
Not here: the result is always in joules, the SI unit. If you need electronvolts, run the joule figure through a photon-energy unit converter afterwards.
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/photon-energy \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"wavelength":5e-7}'const res = await fetch("https://api.kit.forhosting.com/phys/photon-energy", {
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/photon-energy",
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/photon-energy", 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/photon-energy", 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.photon_energy",
"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
Zero or negative inputs are unphysical for a propagating photon and fail as invalid_input without being billed. Successful API calls cost $0.002; failed validation is not billed.
What E = hf = hc/λ means and why the result is in joules
Planck's relation says that a photon's energy equals Planck's constant times the photon's frequency: E = h f.
Input contract, SI units, and what happens when wavelength or frequency is invalid
Zero and negative values are likewise rejected: a photon that propagates in vacuum has a strictly positive wavelength and a strictly positive frequency, and a zero or negative metre or hertz is not a physical input for E = h f = h c / λ. Keep units SI: if you measured 500 nanometres, divide by one billion before calling; the engine never converts nanometres, angstroms, or terahertz. Pair the joule figure with a photon-energy unit converter if you later need electronvolts. Extremely small wavelengths that overflow to Infinity are rejected rather than returned as a non-finite energy. POST a JSON body with at least one of two fields: wavelength, the vacuum wavelength in metres, and frequency, the frequency in hertz. Neither field is independently mandatory, but omitting both is invalid_input. Each value must be a finite number; it may arrive as a JSON number or as a numeric string such as 5e-7 or 6e14. Aliases lambda and wavelength_m map onto wavelength so existing lab payloads do not have to rename the key; aliases freq, f, nu, and frequency_hz map onto frequency. Missing both fields, an empty string, NaN, plus or minus Infinity, and any non-numeric token fail with invalid_input naming the field and are not billed. On success the body echoes the wavelength and frequency actually used, deriving the missing one from c = λ f, returns energy and energy_j as the same joule value, reports planck_constant and speed_of_light as the exact SI constants, and includes formula, method, unit equal to J, and a units object so clients can branch without sniffing shapes. If you send both wavelength and frequency they must be consistent with the speed of light; a mismatch raises invalid_input rather than silently picking one.
Where a photon energy calculator earns its keep, and what it costs
Use the on-page tool for a single line at the desk; use the API when a grader, CMS plugin, or data pipeline needs the same contract under prepaid balance. Do not send a nanometre value and expect the engine to notice the unit; this endpoint is SI metres and hertz only.
Technical questions
How do I calculate photon energy from wavelength?
Send a finite positive vacuum wavelength in metres as wavelength (aliases lambda, wavelength_m). The API returns energy in joules as E = h c / λ with h = 6.62607015e-34 J·s and c = 299792458 m/s exact, and derives frequency from c = λ f.
How do I calculate photon energy from frequency?
Send a finite positive frequency in hertz as frequency (aliases freq, f, nu, frequency_hz). The API returns energy in joules as E = h f and derives the vacuum wavelength from λ = c / f.
What does the photon energy calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.