ForHosting KIT · Science

Optical density calculator

If 100 units of light reach a sample and 10 get through, transmittance is 0.1 and optical density is exactly 1. Enter the incident and transmitted intensities on the same scale to get absorbance and transmittance. 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
Incident
100
Transmitted
10
You get
Transmittance
0.1
Percent transmittance
10
Absorbance
1
Optical density
1

Optical density, also called absorbance in spectrophotometry, measures how strongly a sample attenuates a beam of light. It is defined from two intensities on the same scale: the incident intensity I0 that reaches the sample and the transmitted intensity I that leaves it. This optical density calculator applies the Beer–Lambert identity OD equals minus the base-ten logarithm of I over I0, which is the same as the common logarithm of I0 over I, and returns that absorbance together with the linear transmittance I over I0. Both intensities must be strictly positive, and transmitted light cannot exceed incident light: a non-positive intensity makes the logarithm undefined, and I greater than I0 is not a passive absorbing sample.

What optical density means and how absorbance is computed

Optical density is the common-logarithm measure of how much a sample attenuates a collimated light beam, and in spectrophotometry it is used interchangeably with absorbance. Start from two intensities expressed in the same photometric units: the incident intensity I0 that arrives at the sample and the transmitted intensity I that continues past it. The linear transmittance is the ratio T equals I divided by I0.

Optical density is then OD equals minus the base-ten logarithm of T, which is identical to the common logarithm of I0 over I. When ten percent of the light is transmitted, T is 0.1 and OD is exactly one; when one percent is transmitted, OD is two; when the sample is fully transparent, I equals I0, T is one, and OD is zero. The logarithm converts a multiplicative attenuation into an additive scale that tracks concentration under the Beer–Lambert law for a fixed path length and molar absorptivity.

Intensities must be strictly positive because the logarithm of zero or of a negative ratio is not a real number. Transmitted intensity must not exceed incident intensity: a passive absorbing sample cannot emit more light than it received, so I greater than I0 is rejected rather than returning a negative absorbance that would describe optical gain. Units cancel in the ratio, so any coherent pair of photocurrent, irradiance, or photon-count readings is valid as long as both use the same scale.

Where optical density readings help, and in what units

Teaching labs, clinical chemistry benches, and process photometers use an optical density calculator whenever a detector reports two raw intensities and the notebook still needs absorbance on the common-logarithm scale. Students check that tenfold attenuation is one absorbance unit without flipping the argument of the logarithm by hand. Quality teams convert paired photocurrents from a filter photometer into OD so they can compare a cuvette, a well plate, or a flow cell against a specification that is written in absorbance, not in counts.

Tutoring platforms and exam generators need a deterministic oracle that rejects a zero intensity instead of silently returning Infinity. This capability stops at absorbance from two intensities; it does not multiply by path length or molar absorptivity, and it does not convert A260 into a nucleic-acid concentration. Failed validation does not consume balance.

Keep both readings in one photometric unit before you call. Do not send a blank-corrected absorbance as if it were an intensity. Keep requests small, pin the rounded optical density in tests, and you get reproducible absorbance for homework, laboratory QC, and edge workers without standing up a computer-algebra system of your own.

Spectrophotometry teaching labs

Students enter incident and transmitted photometer readings and verify that optical density is minus log10 of I over I0, including a clear error when either intensity is not positive.

Filter photometer and plate-reader QC

Convert paired detector counts from a cuvette, well, or flow cell into absorbance so a specification written in OD can be checked without a spreadsheet logarithm.

Homework and LMS auto-grading

Mark optical-density items with a deterministic oracle that rejects non-positive intensities and the unphysical case I greater than I0, and never invents a negative absorbance.

How do I calculate optical density from two intensities?

Send a strictly positive incident intensity I0 and a strictly positive transmitted intensity I that does not exceed I0. Optical density (absorbance) is OD = −log10(I/I0). The response also returns transmittance and percent transmittance.

What happens if incident or transmitted intensity is zero or negative?

Optical density is a common logarithm of a positive ratio, so a non-positive intensity is undefined and is not billed.

Why is transmitted intensity greater than incident intensity rejected?

A passive absorbing sample cannot transmit more light than it received. I greater than I0 would be optical gain, not absorbance, so the calculator rejects that pair instead of returning a negative optical density.

Is optical density the same as absorbance?

In spectrophotometry the two names are used interchangeably for −log10(I/I0).

What does an optical density of 2 mean?

That only one percent of the light gets through. Each unit of optical density is a tenfold drop: 1 means ten percent transmitted, 2 means one percent, and a fully transparent sample has an optical density of 0.

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/optical-density

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/optical-density \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"incident":100,"transmitted":10}'
{
  "incident": 100,
  "transmitted": 10
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "phys.optical_density",
  "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.

What optical density means and how absorbance is computed

Identical numeric inputs always produce identical JSON because the path is pure floating-point arithmetic with no network, no language model, no random seed, and no wall clock.

Input contract, response shape, and intensity validation

Both must be strictly positive. Extremely large magnitudes that would overflow to Infinity are rejected. Example: incident one hundred and transmitted ten is a ten-percent transmittance, so absorbance and optical density are exactly one. POST a JSON body with two required finite numbers: incident, the intensity that reaches the sample, and transmitted, the intensity that leaves it. Zero or a negative incident intensity, or zero or a negative transmitted intensity, makes the logarithm undefined, and the task fails with invalid_input naming the field rather than returning Infinity or NaN. Each field may arrive as a JSON number or as a numeric string; missing fields, empty strings, and non-finite values fail and are not billed. Aliases are accepted so existing lab or instrument payloads map without renaming: I0, i0, I_0, and incident_intensity for incident; I, i, I_t, and transmitted_intensity for transmitted. On success the body echoes incident and transmitted, then transmittance as I over I0, percent_transmittance as one hundred times that ratio, absorbance and optical_density as the same rounded common-logarithm value, plus a formula string restating OD equals minus log10 of I over I0 and method equal to beer_lambert_absorbance so clients can branch without sniffing shapes. Pair the response with your own unit labels if you need a printed certificate; this endpoint returns the numbers, not a formatted report.

What does the optical density calculator 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 →