Photon Flux from Luminosity Calculator
This photon flux calculator converts the power of a monochromatic light source into the number of photons emitted each second.
Run — free
Enter power in watts and wavelength in meters. The calculation first obtains the energy carried by one photon from Planck's constant, the speed of light, and the supplied wavelength, then divides source power by that energy. It is useful for astronomy, spectroscopy, laser work, optical links, and detector planning whenever radiative power must be expressed as a photon emission rate.
Convert monochromatic power into a photon emission rate
Power describes energy transferred per unit time: one watt is one joule per second. A photon rate instead describes how many individual photons carry that energy each second. For monochromatic radiation, every photon has the same energy, so the conversion is direct. The calculator evaluates photon energy as E = h c / lambda, where h is the exact Planck constant, c is the exact speed of light in vacuum, and lambda is wavelength in meters. It then evaluates the emission rate as N = P / E, which is equivalently N = P lambda / (h c). Dividing joules per second by joules per photon leaves photons per second. Longer-wavelength photons carry less energy than shorter-wavelength photons, so the same power corresponds to more photons per second at a longer wavelength. Likewise, doubling the source power doubles the returned rate. The result represents an ideal count rate at the point where the specified power applies. It does not independently model attenuation, geometry, spectral width, absorption, or detector response.
Prepare consistent power and wavelength inputs
Enter source power in watts. Convert milliwatts by dividing by one thousand, microwatts by one million, and other prefixed units before submitting the value. Power may be zero, in which case the emitted photon rate is zero, but it cannot be negative. Enter wavelength in meters and make sure it is strictly greater than zero. A wavelength of 500 nanometers, for example, is 5e-7 meters. Scientific notation is convenient because optical wavelengths and single-photon energies are small compared with ordinary laboratory units. The calculator rejects missing values, text, infinities, negative power, and any wavelength that is zero or negative. These checks prevent undefined photon energy and misleading output. The source must be treated as monochromatic, meaning one wavelength adequately represents its radiation. If the source has a broad spectrum, applying one central wavelength produces only an approximation. A rigorous broadband photon rate requires integrating spectral power divided by photon energy across the entire wavelength distribution rather than substituting a single representative wavelength.
Interpret the rate in an observation or instrument
The returned photons-per-second value is tied to the power location described by the input. If the power is the luminosity emitted by a source, the result is its photon emission rate at that wavelength. If the power was measured after an aperture, filter, fiber, or telescope, the result instead describes the photon rate at that later point. It should not automatically be read as a detector count rate. Optical transmission reduces how many emitted photons reach a sensor, while quantum efficiency determines what fraction of arriving photons produce measurable events. To estimate detector counts, multiply the calculated rate by each applicable transmission factor, geometric collection fraction, and detector efficiency, using dimensionless fractions appropriate to the wavelength. Pulsed sources also need careful interpretation: average power produces an average photons-per-second rate, while photons per pulse require pulse energy divided by photon energy. Keeping the original power, wavelength, and any efficiency assumptions alongside the result makes the calculation auditable. The implementation is deterministic and uses no network, clock, randomness, or retained state. An API calculation costs $0.002 per request.
What you can do with it
Estimate a monochromatic source output
Convert a known radiative power and wavelength into the number of photons emitted each second.
Plan an astronomical observation
Turn collected monochromatic power into an incident photon rate before applying telescope and detector efficiencies.
Check an optical detector budget
Use the ideal photon rate as the starting point for transmission, quantum-efficiency, and expected-count calculations.
FAQ
Which formula does the calculator use?
It uses photon energy E = h c / wavelength, followed by photons per second = power / E.
What units should I enter?
Enter power in watts and wavelength in meters. Convert prefixed units such as milliwatts or nanometers first.
Why must wavelength be positive?
Zero would make the photon-energy formula undefined, while a negative wavelength is not valid for this calculation.
Can I use this for broadband light?
A single representative wavelength gives only an approximation. Accurate broadband work requires integration over the source spectrum.
Does the result equal a detector count rate?
Not automatically. Apply collection losses, optical transmission, and detector quantum efficiency separately.
What does an API calculation cost?
Each API request costs $0.002.
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/astro/photon-flux-from-power \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"power_w":1,"wavelength_m":5e-7}'const res = await fetch("https://api.kit.forhosting.com/astro/photon-flux-from-power", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"power_w": 1,
"wavelength_m": 5e-7
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/astro/photon-flux-from-power",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"power_w": 1,
"wavelength_m": 5e-7
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/astro/photon-flux-from-power", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"power_w":1,"wavelength_m":5e-7}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"power_w":1,"wavelength_m":5e-7}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/astro/photon-flux-from-power", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"power_w": 1,
"wavelength_m": 5e-7
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "astro.photon_flux_from_power",
"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. |