Percent to molarity calculator
37 % hydrochloric acid with a density of 1.19 g/mL and a molar mass of 36.46 g/mol is about 12 mol/L: enter the bottle's percent, density and molar mass to get the molarity and the grams of solute per litre. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Mass percent of solute
- 37
- Solution density in g/mL
- 1.19
- Molar mass
- 36.46
- Molarity
- 12.076247943 mol/L
- Mass solute per L
- 440.3
- Moles per L
- 12.076247943
- Precision
- 10
This percent-to-molarity calculator converts a solution’s mass percent by weight, its density, and the solute’s molar mass into molarity in moles per litre. Reagent bottles and many lab protocols still list concentration as a weight percent with a table density, while stoichiometry, titrations, and rate laws almost always need moles per litre. The conversion used here is fully deterministic: molarity equals mass percent times density times ten, divided by molar mass, when density is in grams per millilitre and molar mass is in grams per mole. Classic checks include about thirty-seven percent hydrochloric acid near density one point one nine with molar mass thirty-six point four six yielding roughly twelve molar, and ten percent sodium hydroxide at density one point one one with molar mass forty yielding two point seven seven five molar. The engine uses only finite arithmetic with no network calls, no sampling, and no date-dependent shortcuts.
What converting mass percent to molarity means
Mass percent by weight, often written percent w/w or simply mass percent, is one hundred times the mass of solute divided by the mass of the whole solution. Molarity is moles of solute per litre of solution. Those two descriptions are not interchangeable without density and molar mass: a fixed mass percent can correspond to different molarities if the solution density changes with temperature or composition, and a fixed molarity can correspond to different mass percents for solutes of different molecular weight.
The standard bridge for density in grams per millilitre is to consider one litre of solution, form the solution mass as density times one thousand millilitres, take the solute mass as that total times mass percent over one hundred, convert solute mass to moles with the molar mass, and report moles per litre. Algebraically that collapses to molarity equals mass percent times density times ten, all divided by molar mass. Zero mass percent with positive density and molar mass is valid and yields zero molarity.
Where percent-to-molarity conversion fits in study, lab work, and software
Students meet this conversion when a textbook lists commercial acids and bases by mass percent and density and then asks for molarity before a titration or neutralization stoichiometry problem. Teachers can pre-generate answer keys for reagent bottles and dilution setups without trusting opaque apps that mix mass percent with volume percent or assume density of one without stating it. Lab technicians and preparers use the same formula when a protocol requires a stated molarity and the stock label only shows weight percent plus a density table at a given temperature.
Developers call the same contract from scripts to seed deterministic test vectors for chemistry tutors, to normalize inventory labels before a LIMS export, or to satisfy programming-challenge statements that demand mol per L from percent and density rather than a hand-waved sketch. Pair it with molar concentration from moles and volume when you already measured amount and flask size, and with other chemistry helpers when you are building a small lab of free, deterministic solution calculators.
What you can do with it
Bottle labels and homework
Convert commercial mass percent and table density into mol/L before titration, dilution, or stoichiometry exercises.
Lab prep and LIMS helpers
Normalize stock-reagent labels into molarity for preparation sheets, inventory exports, and teaching software.
FAQ
What does the percent-to-molarity calculator cost?
It is free in your browser on this page.
What happens if molar mass is zero?
Zero or negative molar mass makes the conversion undefined (division by zero).
Which density units are expected?
Grams per millilitre (g/mL), equivalent to g/cm³ for liquids. Do not enter kg/m³ without converting first.
Is mass percent the same as volume percent?
No. This calculator uses mass percent (w/w) with density. Volume percent (% v/v) is a different measure and needs a different tool.
What is the molarity of 10 % sodium hydroxide?
With a density of 1.11 g/mL and a molar mass of 40 g/mol, it comes to 2.775 mol/L. The calculator multiplies the percent by the density and by ten, then divides by the molar mass.
Related tools
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/chem/percent-to-molarity \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"mass_percent":37,"density":1.19,"molar_mass":36.46}'const res = await fetch("https://api.kit.forhosting.com/chem/percent-to-molarity", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"mass_percent": 37,
"density": 1.19,
"molar_mass": 36.46
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/chem/percent-to-molarity",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"mass_percent": 37,
"density": 1.19,
"molar_mass": 36.46
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/chem/percent-to-molarity", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"mass_percent":37,"density":1.19,"molar_mass":36.46}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"mass_percent":37,"density":1.19,"molar_mass":36.46}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/chem/percent-to-molarity", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"mass_percent": 37,
"density": 1.19,
"molar_mass": 36.46
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "chem.percent_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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_abs_value | 1000000000000000 |
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. |
Technical notes
What mass percent to molarity means and what the response contains
This calculator returns the validated mass percent, density, and molar mass, the computed molarity, the intermediate solute mass per litre and moles per litre, the precision used, a method tag percent_to_molarity, a short formula reminder, and a unit hint mol/L. There is no automatic unit conversion from kilograms per cubic metre, no temperature-density tables, and no activity or molality path: the engine either evaluates the closed formula inside the supported numeric range or rejects the input with invalid_input. Rejected cases include missing fields, non-finite values, magnitudes above the documented ceiling, negative mass percent, non-positive density, and zero or negative molar mass because division by a non-positive molar mass is undefined.
How mass percent, density, and molar mass are read and stay reproducible
Mass percent must be non-negative; values above one hundred are still accepted as finite numbers so edge cases and super-saturated bookkeeping do not silently fail, but ordinary aqueous reagents fall in a sensible zero-to-one-hundred range. Optional leading plus signs and scientific notation on numeric strings are allowed when they parse as finite decimals; embedded spaces and non-numeric tokens are rejected with a clear field-named message. The preferred field for weight percent is mass_percent, but aliases percent, mass_pct, w_w, percent_w_w, wt_percent, and concentration_percent are accepted so spreadsheets, query strings, and bottle-label forms can reuse the same contract. Density prefers the name density with aliases rho, d, density_g_ml, and solution_density, and must be a finite positive number of grams per millilitre; zero or negative density fails with invalid_input so a bad cell does not become a silent nonsense molarity. Molar mass prefers molar_mass with aliases M, mm, molecular_weight, mw, and molarMass, and must be strictly positive in grams per mole: zero molar mass is rejected explicitly because the conversion formula divides by that value. An optional precision field, with aliases decimals and dp, chooses how many decimal places to expose for the numeric outputs, defaulting to ten and capped at fifteen so JSON goldens stay stable. 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 percent-to-molarity formula yourself.
Where percent-to-molarity conversion fits in study, lab work, and software
Product and education tools use the endpoint when a learner types mass percent, density, and molar mass and the UI must show molarity with a clear unit and intermediate mass-per-litre check. 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.
Integration use cases
Deterministic test fixtures
Generate reproducible molarity values from mass %, density, and molar mass for unit tests, tutors, and CI assertions.
Technical questions
What formula does this tool use?
M = (mass_percent × density × 10) / molar_mass, with mass percent as % w/w, density in g/mL, molar mass in g/mol, and M in mol/L.