ForHosting KIT · Science

Energy to wavelength calculator

A photon carrying 10⁻¹⁹ joules has a vacuum wavelength of about 2 micrometres. Enter a photon energy in joules to get its wavelength in metres, worked out from Planck's constant and the speed of light. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Energy
0
You get
Wavelength
0.0000019864
Planck constant
0
Speed of light
299,792,458

Photon energy and electromagnetic wavelength are two faces of the same quantum of light. Once Planck’s constant and the speed of light are fixed at their exact SI values, the conversion is a single division: wavelength in metres equals h times c divided by energy in joules. This energy to wavelength calculator accepts a positive finite energy, rejects zero and negative values that cannot describe a photon, and returns the vacuum wavelength in metres so laboratory notebooks, spectroscopy pipelines, and homework checkers share one deterministic number. Supply energy in joules; convert electronvolts to joules before calling if your source quotes electronvolts.

What λ = hc/E means and why the SI constants are exact

The Planck–Einstein relation states that a photon’s energy E equals Planck’s constant h times the electromagnetic frequency f. In vacuum the same wave also satisfies c equals f times λ, where c is the speed of light and λ is the wavelength. Eliminating frequency between those two identities produces the conversion this capability computes: λ equals h c divided by E.

Both constants are exact in the modern International System: h is 6.62607015 times ten to the minus thirty-four joule-seconds, and c is two hundred ninety-nine million seven hundred ninety-two thousand four hundred fifty-eight metres per second. Their product is therefore a defined joule-metre factor; dividing it by a positive energy in joules yields a wavelength in metres with no fitted coefficients and no material tables. That is the whole physical model.

The calculator does not insert a refractive index, Doppler shift, or medium correction: the result is the vacuum wavelength associated with that photon energy. Visible-light energies sit near a few times ten to the minus nineteen joules and map to wavelengths of order ten to the minus seven metres. X-ray energies are larger and the wavelength shrinks accordingly.

Because the arithmetic is a single multiplication and a single division, identical inputs always produce identical floating-point results. Zero energy would require a division by zero, and a negative energy would not describe a photon, so those cases are rejected rather than returning Infinity, NaN, or a signed curiosity that no spectrometer would accept.

Where an energy to wavelength conversion earns its keep

Spectroscopy labs convert a reported photon energy into a vacuum wavelength before overlaying a line list or setting a monochromator, and they need the same SI constants every time rather than a slide-rule rounding of h. Coursework that asks students to rearrange E equals hc over λ benefits from an oracle that fails loudly on zero or negative energy instead of printing Infinity and letting a grader argue about presentation. Use the result as metres; multiply by 1e9 yourself if a plot axis is labelled in nanometres.

Pair this conversion with your own band identification or blackbody code when the problem needs more than a wavelength.

Spectroscopy and optical lab notes

Turn a photon energy in joules into a vacuum wavelength in metres before overlaying line lists or setting a monochromator to a SI-consistent value.

Homework and exam checks for E = hc/λ

Let students submit energy in joules and verify λ = hc/E, with zero or negative energy rejected as invalid instead of Infinity.

Detector and source specification checks

Confirm that datasheet energy and wavelength columns agree under exact SI Planck and light-speed constants without a computer-algebra stack.

What units does the energy to wavelength calculator use?

Energy is in joules and wavelength is in metres.

Why is zero or negative energy rejected?

A photon energy must be a positive scalar.

How do I convert electronvolts to joules before entering them?

Multiply the electronvolt figure by the elementary charge, about 1.602176634 × 10⁻¹⁹. If you type electronvolts or kiloelectronvolts directly, you still get a number, but it belongs to an energy many orders of magnitude away from yours.

Is the result the wavelength in air or inside a material?

Neither: it is the wavelength in vacuum. No refractive index, Doppler shift or medium correction is applied, so any adjustment for the material the light travels through is up to you.

Which values of Planck's constant and the speed of light are used?

The exact SI values: Planck's constant is 6.62607015 × 10⁻³⁴ joule-seconds and the speed of light is 299,792,458 metres per second. Their product is a fixed factor, so the same energy always gives the same wavelength.

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.

POSThttps://api.kit.forhosting.com/phys/energy-to-wavelength

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.

curl -X POST https://api.kit.forhosting.com/phys/energy-to-wavelength \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"energy":1e-19}'
{
  "energy": 1e-19
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "phys.energy_to_wavelength",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Successful API calls are billed at $0.002 per item; invalid input is not charged.

Input contract, units, and how errors are reported

Zero and negative values fail with a message that zero or negative photon energy is not allowed, because λ equals hc over E is undefined at zero and physically meaningless below zero. Mixing a kiloelectronvolt figure into the energy field without converting to joules will still compute a number, but that number will be the vacuum wavelength of an energy many orders of magnitude too large. POST a JSON body with the required field energy, a finite number of joules strictly greater than zero. The field may arrive as a JSON number or as a numeric string; aliases E and photon_energy are accepted and mapped to the same value. Missing energy, empty strings, non-numeric text, NaN, and Infinity fail with invalid_input and name the field so a form or a script can highlight the control. On success the body echoes the energy you sent, returns wavelength in metres, labels both quantities in a units object (J and m), restates the formula as λ = hc/E, and includes the exact SI constants planck_constant and speed_of_light so a downstream notebook can reprint the factor without hard-coding a rounded textbook value. Convert electronvolts yourself: one electronvolt is the elementary charge in coulombs times one volt, about 1.602176634 times ten to the minus nineteen joules; this endpoint does not guess the unit. Keep SI units consistent, pin the floating-point wavelength in tests, and failed validation never consumes prepaid balance.

Where an energy to wavelength conversion earns its keep

Detector and source datasheets often quote energy in one column and wavelength in another; a small parse API lets a procurement or QA script check that the two columns agree within rounding without standing up a computer-algebra system. Every successful call costs the published $0.002 base price with no model tokens and no outbound network. Keep requests to a single positive energy, treat invalid_input as a client fix rather than a retry, and you get reproducible vacuum wavelengths for notebooks, LMS plugins, and edge workers without importing a physics library of your own.

How do I convert photon energy to wavelength?

Send a finite positive energy in joules. The API returns vacuum wavelength in metres from λ = hc/E using the exact SI Planck constant and speed of light.

Which Planck constant and speed of light does the calculator use?

The exact SI values: h = 6.62607015e-34 J·s and c = 299792458 m/s. Both are returned in the success payload so you can reprint the factor.

What does an energy to wavelength conversion cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →