Grams of solute for molarity calculator
A 0.5 M sodium chloride solution in 0.25 litres needs 0.125 moles, which is 7.305 grams at 58.44 g/mol. Enter the target molarity, the flask volume and the molar mass to know exactly what to weigh. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Target molarity
- 0.5
- Solution volume in litres
- 0.25
- Molar mass
- 58.44
- Moles
- 0.125 g
- Grams
- 7.305
- Precision
- 10
This grams-of-solute-for-molarity calculator tells you how many grams of pure solid or pure liquid solute you need to weigh out when you want a solution of a stated molar concentration. You supply the target molarity in moles per litre, the final solution volume in litres, and the solute molar mass in grams per mole; the engine multiplies them with the closed form grams equals M times V times MM, which is the same as computing moles first and then converting moles to mass. Classic lab checks include half-molar sodium chloride in a quarter litre with MM of 58.44 grams per mole, which needs 0.125 moles and 7.305 grams, and one-molar sodium hydroxide in one litre with MM of 40, which needs exactly 40 grams. Everything runs with finite deterministic arithmetic only: no network calls, no random sampling, and no date-dependent behaviour.
What grams for molarity means and what you get
Molarity is moles of solute per litre of solution. When you prepare a solution from a solid or neat liquid, you rarely measure moles directly: you weigh a mass on a balance and dissolve it to the mark in a volumetric flask. The link between those ideas is molar mass.
First multiply the desired molarity by the desired volume to get the amount of substance in moles, then multiply by the molar mass in grams per mole to get the mass in grams. There is no approximate solver and no table lookup of molecular weights: you must supply the molar mass yourself from a periodic table, SDS, or bottle label.
If you already know mass and want concentration instead, use a molar concentration tool; this page answers only the preparation question of how many grams to weigh for a target M and V.
Where solute mass for molarity fits in labs, study, and software
Students meet this calculation when a textbook asks how many grams of NaCl or glucose to dissolve for a stated molar solution, when a lab manual lists molarity and flask volume but not mass, or when they convert a stock recipe from moles to weighable grams. Teachers can pre-generate answer keys for common salts without trusting opaque calculator apps that switch units silently.
Bench chemists use the same formula for buffers, media, and calibration standards when the bottle lists purity and molar mass and the protocol lists M and mL converted to litres. Developers call the contract from scripts to seed deterministic test vectors for LIMS weigh lists, e-learning quizzes, and lab notebook helpers that must not invent molecular weights. Contest and homework practice often needs a fast offline source of mass answers so solutions can be checked without a programmable calculator under time pressure.
Product and education tools use the rewrite when a learner types target M, volume, and MM and the UI must show grams and moles clearly. Pair it with dilution or molar concentration tools when you need related solution chemistry steps.
What you can do with it
Lab prep and volumetric flasks
Compute grams of solid solute to weigh for a target molarity and flask volume before dissolving to the mark.
Homework and answer keys
Check textbook problems that ask for mass from M, V, and molar mass with stable, reproducible numbers.
FAQ
What does the grams-of-solute-for-molarity calculator cost?
It is free in your browser on this page.
What formula is used?
grams = M × V × MM, where M is molarity in mol/L, V is volume in litres, and MM is molar mass in g/mol. Equivalently moles = M × V and grams = moles × MM.
What happens if volume or molar mass is zero or negative?
Non-positive volume cannot define a physical solution volume, and non-positive molar mass cannot convert moles into grams.
Does this tool look up molar masses for me?
The calculator only multiplies M, V, and MM.
Why are results rounded to a precision?
Default precision is 10 decimal places; you can set precision from 0 to 15.
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/grams-solute-for-molarity \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"molarity":0.5,"volume":0.25,"molar_mass":58.44}'const res = await fetch("https://api.kit.forhosting.com/chem/grams-solute-for-molarity", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"molarity": 0.5,
"volume": 0.25,
"molar_mass": 58.44
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/chem/grams-solute-for-molarity",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"molarity": 0.5,
"volume": 0.25,
"molar_mass": 58.44
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/chem/grams-solute-for-molarity", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"molarity":0.5,"volume":0.25,"molar_mass":58.44}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"molarity":0.5,"volume":0.25,"molar_mass":58.44}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/chem/grams-solute-for-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
{
"molarity": 0.5,
"volume": 0.25,
"molar_mass": 58.44
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "chem.grams_solute_for_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 grams for molarity means and what the response contains
This calculator returns the normalized molarity, volume, and molar_mass you provided, the intermediate moles amount, the grams of solute required, the precision used for display, a method tag grams_solute_for_molarity, a short formula string, and the mass unit g. Invalid inputs fail with invalid_input rather than inventing a mass. Rejected cases include missing molarity, volume, or molar_mass, non-finite values, magnitudes above the documented ceiling, negative molarity, and any non-positive volume or molar mass, because zero or negative volume cannot define a physical solution of given concentration and zero or negative molar mass cannot convert moles into grams.
How inputs are read and how grams stay reproducible
Optional leading plus signs and scientific notation on numeric strings are allowed when they parse as finite decimals; hex prefixes, embedded spaces, and non-numeric tokens are rejected with a clear message so a bad spreadsheet cell does not become a wrong weigh-out. Volume and molar mass must be strictly positive: zero volume would force division-like nonsense in related workflows and cannot be a prepared solution volume here, and zero molar mass cannot map moles to mass. The preferred fields are molarity for target concentration in mol/L, volume for solution volume in litres, and molar_mass for the solute molar mass in g/mol. Aliases are accepted so forms and query strings can reuse common names: M, c, concentration, target_molarity, and mol_per_L for molarity; V, v, liters, litres, and volume_L for volume; and MM, mm, molecular_weight, mw, and molarMass for molar mass. Zero molarity is valid and simply yields zero moles and zero grams, which is useful for empty blanks or dilution endpoints. An optional precision field, with aliases decimals and dp, chooses how many decimal places to expose for all numeric outputs, defaulting to ten and capped at fifteen so JSON goldens stay stable across runs. Pair the free browser run on this page with the priced API when you need the identical mass inside an automated pipeline.
Where solute mass for molarity fits in labs, study, 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.
Integration use cases
Teaching software and CI fixtures
Generate deterministic grams and moles for quizzes, LIMS helpers, and automated solution-prep tests.