ForHosting KIT · Science

PPB to molarity calculator

1000 ppb of a solute with a molar mass of 58.44 g/mol, in a solution of density 1 g/mL, is 0.000017111567 mol/L. The tool works on one litre of solution and shows its mass, the solute mass and the moles. 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
Ppb
1,000
Density
1
Molar mass
58.44
You get
Molarity
0.0000171116 mol/L
Mass solution g
1,000
Mass solute g
0.001
Moles
0.0000171116

A PPB to molarity calculator turns a parts-per-billion concentration, the density of the solution, and the molar mass of the solute into the volume-based molarity used in kinetics, equilibria, environmental reporting, and most analytical methods. Enter ppb by mass (mass of solute per mass of solution times one billion), density in grams per milliliter, and molar mass in grams per mole; the tool returns molarity in moles per liter, intermediate solution mass, solute mass, and moles on a one-liter basis, a readable formula, and step-by-step substitution so you can check the arithmetic by hand.

What ppb and molarity mean and how they convert

Parts per billion by mass, often written ppb or μg/kg of solution, is one billion times the mass of solute divided by the mass of the whole solution. It is a dimensionless mass fraction scaled by one billion, so it does not by itself know the volume of the liquid. Molarity, often written capital M, is moles of solute per liter of solution and is the concentration that appears in rate laws, equilibrium constants, and most titration and instrumental methods.

Because molarity needs volume while mass-ppb needs only mass ratio, you cannot convert between them without knowing how much space a given mass of solution occupies—that is the density. The standard closed-form route assumes a known solution density ρ in grams per milliliter and a known solute molar mass M_w in grams per mole.

Taking one liter of solution as the basis, mass of solution equals ρ times one thousand grams, mass of solute equals that mass times ppb over one billion, moles equal mass of solute divided by M_w, and molarity equals moles per one liter. Simplifying yields the textbook formula M equals ppb times ρ divided by M_w times one million.

Density and molar mass must both be strictly positive; a zero density would imply zero mass in a liter, and a zero or negative molar mass is not physical for a real pure solute. This calculator implements that conversion only: it does not invert molarity to ppb without density, look up densities from tables, treat aqueous μg/L as identical to mass-ppb without checking density, or model multi-solute mixtures.

Practical tips, limits, and related searches

Use the density of the solution, not the pure solvent, whenever the problem gives it; for dilute aqueous samples the density is near one gram per milliliter, but brines, organics, and concentrated standards can differ enough to change molarity at the second significant figure of a trace result. Keep molar mass in grams per mole and density in grams per milliliter so the factor of one million in the formula stays consistent; do not mix kilograms per mole with grams per milliliter without converting first.

Prefer sending numbers rather than pre-formatted strings when you control the client; string numbers are accepted only when they match a strict finite numeric pattern. Prefer this capability when you already have ppb, ρ, and M_w and only need M; if your source is a word problem with micrograms per liter of water, confirm whether that figure already assumes density near one or still needs an explicit density.

Round-trip checks are easy: recompute ppb times ρ over M_w times one million by hand and confirm it equals the published molarity within the same twelve-decimal rounding, and confirm that moles divided by one liter reproduces molarity on the one-liter basis.

Homework checks for trace concentration conversion

Students enter mass-ppb, density, and molar mass from textbook problems and compare hand-written molarity and intermediate moles against a deterministic result before submitting.

Environmental lab unit reconciliation

Technicians convert a parts-per-billion reading on a lab report into the molar working concentration used in equilibrium or speciation calculations without a spreadsheet for each check.

How do you convert ppb to molarity?

Use M = (ppb · ρ) / (M_w · 1e6), where ppb is mass parts per billion, ρ is solution density in g/mL, and M_w is solute molar mass in g/mol. The result M is molarity in mol/L.

Is mass-ppb the same as μg/L?

Only when density is exactly 1 g/mL (typical dilute water). In general, mass-ppb is a mass fraction; converting to mol/L still needs density and molar mass as this calculator requires.

What density unit should I use?

Grams per milliliter (g/mL), which is numerically the same as kg/L or g/cm³. Pair it with molar mass in g/mol so the formula’s factor of 1e6 is correct.

Is the PPB to molarity calculator free?

The browser tool is free and runs locally.

Why does the calculator need the density of the solution?

Because ppb compares masses while molarity counts moles per litre, and density tells you how many grams one litre of solution weighs. Dilute water samples sit near 1 g/mL, but brines, organic liquids and concentrated standards can shift a trace result.

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/chem/ppb-to-molarity

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/chem/ppb-to-molarity \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ppb":1000,"density":1,"molar_mass":58.44}'
{
  "ppb": 1000,
  "density": 1,
  "molar_mass": 58.44
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "chem.ppb_to_molarity",
  "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_abs1000000000000
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.

When density or molar mass is zero or negative the conversion is undefined or non-physical, so the API returns a clear invalid_input error instead of Infinity or a silent NaN.

How to call the API and what comes back

The ppb field must be non-negative; density and molar mass must be strictly positive—values at or below one times ten to the minus fifteen, or any non-positive density or molar mass, are rejected. Send a JSON body with three required finite numbers: ppb (aliases parts_per_billion, concentration_ppb, c_ppb, ppb_mass) as a non-negative mass-fraction parts-per-billion value, density (aliases rho, the Greek letter rho, solution_density, d) in grams per milliliter—which is numerically equal to kilograms per liter—and molar_mass (aliases M_w, Mw, molecular_weight, solute_molar_mass, mm) in grams per mole. Absolute values must stay within the published limit of one trillion so intermediate products remain finite in IEEE double precision on the Worker and in the browser. On success the response echoes rounded ppb, density, and molar_mass, sets molarity to the rounded mol-per-liter value, unit to the string mol/L, mass_solution_g and mass_solute_g and moles to the one-liter intermediates, formula to M equals ppb times rho over M_w times one e six, message to a short English summary, and steps to an ordered array of substitution lines. Failed validation—missing fields, non-finite numbers, values outside absolute limits, negative ppb, or zero or negative density or molar mass—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price.

Practical tips, limits, and related searches

For teaching, pair examples: one thousand ppb of sodium chloride with density one gram per milliliter and molar mass fifty-eight point four four grams per mole yields about one point seven one one two times ten to the minus five molar; fifty ppb with density one point zero two and molar mass one hundred yields five point one times ten to the minus seven molar; and density zero demonstrates the hard invalid_input path that protects division by a non-physical mass. This landing targets people searching for a ppb to molarity calculator, convert parts per billion with density, or mass ppb to mol per liter online; it is not a mass-percent tool, not a molality converter, and not a temperature-dependent density model. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately set density to zero.

Unit tests for solution-chemistry software

Generate known-good ppb-to-molarity cases plus deliberate zero-density or zero-molar-mass rejections for coding kata and API contract tests.

What happens when density or molar mass is zero?

The conversion is undefined or non-physical. This tool returns invalid_input instead of Infinity or NaN.

Read the full KIT documentation →