ForHosting KIT · Science

Particles to grams calculator

6.02214076 × 10²³ water molecules at 18.015 g/mol weigh exactly 18.015 g, because that count is one mole. Enter the number of particles and the molar mass to get the mass a balance would show. 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
Number of elementary entities
602,214,076,000,000,000,000,000
Molar mass
18.015
You get
Moles
1
Mass
18.015
Avogadro
602,214,076,000,000,000,000,000
N A
602,214,076,000,000,000,000,000

A particles-to-grams calculator turns a counted number of atoms, molecules, ions, or formula units plus a known molar mass into the sample mass a balance would report. Enter the particle count N and molar mass M in grams per mole; the tool divides by Avogadro's number to get moles, then multiplies by M to get m equals N times M over N_A in grams. Stoichiometry homework, nanochemistry estimates, exam checks, and automated graders all need that particle-count-to-mass bridge without a spreadsheet or a full chemical database.

What particle count, moles, and molar mass mean together

Chemists count matter on two scales at once. The particle count N is the number of elementary entities—atoms in a metal sample, molecules of a pure substance, ions in a salt lattice, or formula units of an ionic compound—while moles place that same count on Avogadro's scale of one mole equals N_A entities. Molar mass M is the mass of one mole of that pure substance, usually tabulated in grams per mole from the molecular or formula weight.

Combining both gives the closed mass formula m equals N times M divided by N_A, which is exactly the product of intermediate moles n equals N over N_A and m equals n times M. Those identities are exact in SI once units are consistent: a pure entity count times grams per mole over mol inverse yields grams.

Teachers and automated graders care about the zero-molar-mass rejection as much as the happy path: dividing by a blank or zero M is not a physical conversion, and a silent fallback would hide a data-entry error. One mole of water entities with M about 18.015 grams per mole is the classic teaching example—about six times ten to the twenty-three molecules weigh roughly eighteen grams—while salts, metals, and polymers simply change M and N.

The check path recomputes moles and mass with the same fixed rounding used for published fields, so a successful response always ships with steps you can assert in tests or lab notebooks without re-deriving Avogadro's constant by hand.

Practical tips, limits, and related searches

Keep particle counts and molar masses inside the published absolute ranges so n equals N over N_A and m equals n times M cannot overflow into a non-finite result the solver must reject. 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. Use grams per mole for M consistently—if your source is kilograms per mole, convert before calling rather than mixing unit systems inside one request.

Prefer this capability when you already have an entity count and a known M; if you only have moles, use a moles-to-grams path, and if you only need moles from particles, use an Avogadro converter. Round-trip checks are easy: convert particles to mass, divide mass by M to recover moles, multiply moles by N_A to recover the original particle count within the same twelve-decimal rounding, and confirm that the published formula string matches m equals N times M over N_A on every success.

Homework checks for mass from atom counts

Students enter textbook particle counts and tabulated molar masses, then compare hand-written grams against a deterministic result before submitting.

Nanochemistry mass estimates

Researchers convert counted nanoparticles or formula units plus molar mass into an expected sample mass for weigh-out or balance cross-checks.

How do you convert particles to grams?

Use m = N · M / N_A: divide the particle count by Avogadro's number to get moles, then multiply by molar mass M in g/mol to get mass in grams.

What happens when molar mass is zero or negative?

Molar mass must be strictly positive; zero or non-positive M is not a valid conversion.

Is this the same as moles to grams?

No. This path starts from a particle count. If you already have moles, use a moles-to-grams calculator (m = n · M) instead.

Is the particles to grams calculator free?

The browser tool is free and runs locally.

Which Avogadro constant does it use?

The exact SI value, 6.02214076 × 10²³ per mole, fixed by the 2019 redefinition of the mole. The calculator divides your particle count by it to get moles, then multiplies by the molar mass to get grams.

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/particles-to-grams

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/particles-to-grams \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"particles":6.02214076e+23,"molar_mass":18.015}'
{
  "particles": 6.02214076e+23,
  "molar_mass": 18.015
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "chem.particles_to_grams",
  "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_particles1e+36
max_abs_mass1000000000000
max_abs_molar_mass1000000000000
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.

Zero or non-positive molar mass is rejected with a clear invalid_input error so a worksheet typo never silently produces zero or nonsense mass.

How to call the API and what comes back

Molar mass must be strictly positive—values at or below one times ten to the minus fifteen are treated as zero and rejected. Send a JSON body with two required finite numbers: particles (aliases N, atoms, molecules, entities, count, particle_count) as a non-negative entity count, and molar_mass (aliases M, molecular_weight, mw, molarMass) in grams per mole. Particle absolute values must stay within the published particle limit so intermediate moles remain finite in IEEE double precision on the Worker and in the browser; molar mass and computed mass stay within the published mass limit of one trillion. On success the response echoes rounded particles, moles, mass, and molar_mass, sets avogadro and N_A to the exact SI constant 6.02214076 times ten to the twenty-three per mole, unit_particles to entities, unit_moles to mol, unit_mass to g, unit_molar_mass to g/mol, unit_avogadro to mol^-1, formula to m equals N times M over N_A, message to a short English summary, and steps to an ordered array of substitution lines including the moles intermediate. Failed validation—missing particles or molar_mass, non-finite numbers, values outside absolute limits, negative particles, or zero or non-positive 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

When teaching, pair examples: N_A particles of water with M equals 18.015 yields one mole and 18.015 grams; half of N_A sodium chloride units with M equals 58.44 yields half a mole and about 29.22 grams; and molar_mass equals zero demonstrates the hard invalid_input path. This landing targets people searching for a particles to grams calculator, atoms to mass, or mass from particle count and molar mass online; it is not a molecular-weight look-up from a chemical name, not a pure moles-to-grams converter without a particle count, and not a pure Avogadro moles-to-atoms tool without mass. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately set M to zero.

Unit tests for particle-to-mass helpers

Generate known-good N and M pairs plus deliberate zero-molar-mass rejections for coding kata and grading pipelines.

Which Avogadro constant is used?

The exact SI value N_A = 6.02214076×10²³ mol⁻¹ (2019 redefinition). It is published on every success as avogadro and N_A.

Read the full KIT documentation →