ForHosting KIT · Science

Refractive index from speed of light

Divide 299792458 m/s by the speed light reaches inside your sample: at two-thirds of that pace, the refractive index is 1.5. Built for lab readings and homework that give a medium speed and ask for n. 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
Speed
199,861,638.66666666
You get
Refractive index
1.5
C
299,792,458
Precision
10

This refractive index from speed of light calculator turns the phase speed of light inside a medium into the absolute refractive index using the defining relation n equals c over v. Absolute index compares the vacuum speed of light c to the phase speed v inside glass, water, plastic, air, or any homogeneous isotropic sample you measure or are given in a problem set. The identity is fully deterministic: n equals c divided by v, with a default vacuum speed of two hundred ninety-nine million seven hundred ninety-two thousand four hundred fifty-eight meters per second, the SI exact value. Classic checks include a medium at two-thirds of c yielding n equals one point five, and a water-like speed near two point two five times ten to the eight meters per second recovering an index near one point three three. The engine uses only finite arithmetic with no network calls, no sampling, and no date-dependent shortcuts.

What the from-speed solve returns and how to read the fields

The absolute refractive index of a homogeneous isotropic medium is defined by n equals c over v, where c is the speed of light in vacuum and v is the phase speed of a monochromatic plane wave in that medium. Values greater than one mean light travels slower than in vacuum; vacuum itself has n equals one when v equals c; exotic metamaterial contexts can discuss n below one, but this calculator still requires positive finite inputs so the quotient stays defined.

This page is deliberately one-directional: you supply the medium phase speed and receive n, not the reverse conversion from a known index back to speed. That focus matches the common lab and homework prompt that measures or states a speed of light in the medium and asks for the refractive index before Snell's law or optical path length work begins.

Where from-speed refractive-index checks fit in study, labs, and software

Students meet this conversion when a lab measures transit time or optical path and reports a medium speed that must become n, when a homework set gives the speed of light in glass or water and wants the index, or when a contest problem states a fraction of c and expects the refractive index without a full wave chapter. Teachers can pre-generate answer keys for modest speeds without trusting opaque calculator apps that silently switch units or round c inconsistently between problems.

Developers call the same contract from scripts to seed deterministic test vectors for optics widgets, to normalize user-entered medium speed before a classroom demo, or to satisfy programming-challenge statements that demand n rather than a hand-waved material label. Contest practice often needs a fast, offline source of refractive indexes so solutions can be checked without programmable calculators under time pressure. Product and education tools use the solve when a learner types a medium speed and the UI must show the matching absolute index with a clear formula string.

Homework and lab checks

Convert measured or textbook medium speeds into absolute n = c/v before Snell's law or optical path calculations.

Tutoring and optics widgets

Normalize user-entered medium speed for interactive lessons, material demos, and quick c/v quizzes.

What does the refractive index from speed calculator cost?

It is free in your browser on this page.

How is refractive index defined here?

Absolute refractive index n = c/v, where c is the vacuum speed of light and v is the phase speed in the medium.

What happens if speed is zero or negative?

Non-positive medium speed makes n = c/v undefined or non-physical for this calculator.

Can I compute speed from a known refractive index?

No. This page only computes n from medium speed.

What vacuum speed c is used by default?

The SI exact value 299792458 m/s. You may override c when a problem uses a rounded constant such as 3e8.

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/optics/refractive-index-from-speed

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/optics/refractive-index-from-speed \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"speed":199861638.66666666}'
{
  "speed": 199861638.66666666
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "optics.refractive_index_from_speed",
  "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.

max_abs_value1000000000000000
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 the from-speed solve returns and how to read the fields

The calculator returns the speed you provided after rounding, the computed refractive_index, the vacuum speed c used (defaulting to the SI exact constant when you omit it), the precision applied, a short formula string n equals c over v, and the method tag refractive_index_from_speed. There is no material database lookup, no wavelength-dependent dispersion model, and no random sampling of samples: the engine either builds an exact floating-point quotient inside the supported magnitude range or rejects the input with invalid_input. Rejected cases include a missing speed, non-finite values, magnitudes above the documented ceiling, and any non-positive speed or vacuum c, because a zero or negative medium speed makes n equals c over v undefined or non-physical for this absolute definition.

How medium speed and vacuum c are read and stay reproducible

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 index. The same positive check applies to vacuum c. The preferred field is speed for the medium phase velocity, but aliases v, velocity, medium_speed, speed_of_light, and speed_in_medium are accepted so spreadsheets, query strings, and typed forms can reuse the same contract without renaming columns. Optional vacuum speed c, with aliases c0, vacuum_speed, speed_vacuum, and c_vacuum, defaults to two hundred ninety-nine million seven hundred ninety-two thousand four hundred fifty-eight meters per second when omitted, matching the SI definition; override it only when a textbook problem uses a rounded c such as three times ten to the eight so your answer matches the printed key. Non-positive speed is never valid: if speed is at or below a tiny epsilon, the request fails with invalid_input because the refractive index is undefined or non-physical. An optional precision field, with aliases decimals and dp, chooses how many decimal places to expose for the numeric fields, defaulting to ten and capped at fifteen so JSON goldens stay stable across runtimes. 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 quotient yourself.

Where from-speed refractive-index checks fit in study, labs, 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 Snell's law, critical-angle, and thin-lens tools and other math and science endpoints when you are building a small lab of free, deterministic helpers for geometry, algebra, and introductory physics optics.

Deterministic test fixtures

Generate reproducible refractive_index values from known speeds for unit tests, property checks, and CI assertions.

Read the full KIT documentation →