Molarity to molality calculator
1 M sodium chloride with a density of 1.04 g/mL is about 1.019 mol/kg. Turn a stock solution's molarity into the molality that freezing-point and boiling-point formulas expect, using density and molar mass. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Molarity
- 1
- Solution density in g/mL
- 1.04
- Molar mass
- 58.44
- Molality
- 1.0187864216 mol/kg
- Mass solution g per L
- 1,040
- Mass solute g per L
- 58.44
- Mass solvent kg per L
- 0.98156
This molarity-to-molality calculator converts a solution’s molar concentration in moles per litre, its density, and the solute’s molar mass into molality in moles per kilogram of solvent. Colligative-property problems, freezing-point depression, boiling-point elevation, and many thermodynamic tables prefer molality because it is independent of temperature-driven volume changes, while lab stock solutions and bottle labels are often prepared or quoted in molarity. The conversion used here is fully deterministic: for density in grams per millilitre and molar mass in grams per mole, molality equals molarity divided by density minus one-thousandth times molarity times molar mass. Classic checks include one-molar sodium chloride near density one point zero four with molar mass fifty-eight point four four yielding about one point zero one nine molal, and two-molar sucrose near density one point two five with molar mass three hundred forty-two point three yielding a lower molality once solvent mass is removed. The engine uses only finite arithmetic with no network calls, no sampling, and no date-dependent shortcuts.
From moles per litre to moles per kilogram
Molarity is moles of solute per litre of solution. Molality is moles of solute per kilogram of solvent, not of the whole solution. Those two descriptions are not interchangeable without density and molar mass: the same molarity can map to different molalities when density or solute molecular weight changes, and molality stays fixed when temperature expands the volume of a closed mixture while molarity does not.
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 molarity times molar mass, subtract to obtain solvent mass in grams, convert solvent mass to kilograms, and divide moles of solute by that solvent mass. Algebraically that collapses to molality equals molarity divided by density minus zero point zero zero one times molarity times molar mass.
Zero molarity with positive density and molar mass is valid and yields zero molality.
Where molarity-to-molality conversion fits in study, lab work, and software
Students meet this conversion when a textbook gives molarity and a table density for a salt or sugar solution and then asks for molality before freezing-point depression, boiling-point elevation, or osmotic-pressure work that is written in molal terms. Teachers can pre-generate answer keys for colligative-property homework without trusting opaque apps that swap molarity for molality or assume density of one without stating it.
Lab technicians and preparers use the same formula when a protocol requires a stated molality and the stock solution is known only as a molar concentration with a measured density. Developers call the same contract from scripts to seed deterministic test vectors for chemistry tutors, to normalize concentration fields before a LIMS export, or to satisfy programming-challenge statements that demand moles per kilogram of solvent rather than a hand-waved sketch.
Pair it with percent-to-molarity when you start from a bottle label in weight percent, and with other chemistry helpers when you are building a small lab of free, deterministic solution calculators.
What you can do with it
Colligative-property homework
Convert lab molarity plus table density into mol/kg solvent before freezing-point, boiling-point, or osmotic-pressure exercises.
Lab prep and LIMS helpers
Normalize stock molar concentrations into molality for preparation sheets, inventory exports, and teaching software.
FAQ
What does the molarity-to-molality calculator cost?
It is free in your browser on this page.
What formula does this tool use?
m = M / (ρ − 0.001·M·MM), with M in mol/L, density ρ in g/mL, molar mass MM in g/mol, and m in mol/kg solvent.
When is density considered too low?
When solute mass per litre (M × MM) meets or exceeds solution mass (ρ × 1000).
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 molality the same as molarity?
No. Molarity is moles per litre of solution; molality is moles per kilogram of solvent. They match only in special limiting cases (very dilute solutions near unit density).
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/molarity-to-molality \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"molarity":1,"density":1.04,"molar_mass":58.44}'const res = await fetch("https://api.kit.forhosting.com/chem/molarity-to-molality", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"molarity": 1,
"density": 1.04,
"molar_mass": 58.44
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/chem/molarity-to-molality",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"molarity": 1,
"density": 1.04,
"molar_mass": 58.44
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/chem/molarity-to-molality", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"molarity":1,"density":1.04,"molar_mass":58.44}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"molarity":1,"density":1.04,"molar_mass":58.44}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/chem/molarity-to-molality", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"molarity": 1,
"density": 1.04,
"molar_mass": 58.44
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "chem.molarity_to_molality",
"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 molarity to molality means and what the response contains
This calculator returns the validated molarity, density, and molar mass, the computed molality, intermediate masses for solution, solute, and solvent per litre, the precision used, a method tag molarity_to_molality, a short formula reminder, and a unit hint mol/kg. There is no automatic unit conversion from kilograms per cubic metre, no temperature-density tables, and no reverse molality-to-molarity path in this capability: 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 molarity, non-positive density or molar mass, and density that is too low for the stated molarity and molar mass because solvent mass would be zero or negative.
How molarity, density, and molar mass are read and stay reproducible
Beyond simple positivity, density must be high enough that the product of molarity and molar mass does not meet or exceed one thousand times density; otherwise solute mass would equal or exceed solution mass and solvent mass would not be positive. Molarity must be non-negative; ordinary aqueous reagents fall in a sensible low-double-digit range, but the engine only enforces the finite magnitude ceiling declared in limits. 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 concentration is molarity, but aliases M, c, concentration, mol_L, and molar_concentration are accepted so spreadsheets, query strings, and lab 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. That case fails with invalid_input and an explicit density-too-low message so a bad cell does not become a silent nonsense molality. Molar mass prefers molar_mass with aliases mm, molecular_weight, mw, molarMass, and solute_molar_mass, and must be strictly positive in grams per mole. 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 molarity-to-molality formula yourself.
Where molarity-to-molality conversion fits in study, lab work, and software
Product and education tools use the endpoint when a learner types molarity, density, and molar mass and the UI must show molality with a clear unit and intermediate solvent-mass 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 molality values from M, density, and molar mass for unit tests, tutors, and CI assertions.