ForHosting KIT · Science

Mass percent to mole fraction calculator

In a 20% sodium chloride solution, salt is only about 7 of every 100 moles. Enter the mass percent and the two molar masses to get both mole fractions, ready for Raoult's law or freezing-point work. 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
Solute mass percent
20
Solute molar mass
58.44
Solvent molar mass
18.015
You get
Solvent mass percent
80
Solute mass fraction
0.2
Solvent mass fraction
0.8
Moles solute per unit mass
0.0034223135

Mass percent (weight percent, wt%) is how bottles, assay sheets, and many lab notebooks report composition: grams of solute per one hundred grams of mixture. Mole fraction instead counts moles and is the composition variable needed for Raoult's law, ideal-solution chemical potentials, freezing-point depression formulas, and many equilibrium constants. Converting from mass percent to mole fraction is a short closed-form step once the molar masses of solute and solvent are known: scale the percent to a mass fraction, form moles per unit mass for each species as mass over molar mass, then divide the solute moles by the total. This calculator takes one solute mass percent and the two molar masses for a binary mixture, returns the solute mole fraction as the primary answer, and also reports the solvent mole fraction, the derived mass fractions, and the intermediate mole amounts so homework and audit trails stay transparent.

How mass percent converts to mole fraction

Start from a fixed basis of one hundred mass units of mixture so the solute mass percent p is literally the mass of solute and the solvent mass is one hundred minus p. Divide each mass by one hundred to obtain dimensionless mass fractions, or equivalently work with moles proportional to p over M_s and open parenthesis one hundred minus p close parenthesis over M_v.

The same construction with solvent moles in the numerator gives the solvent mole fraction, and for a true binary the two mole fractions sum to one. Molar masses must use consistent units, typically grams per mole when the mass percent is a weight percent of the same mixture; only the ratio of masses to molar masses matters, so any mass-per-mole unit works if both species use it. Mass percent must lie in the closed interval from zero to one hundred.

Where mass-percent to mole conversion shows up in real work

Secondary-school and university chemistry courses assign drills that start from weight-percent labels on bottles or assay sheets and ask for mole fraction before applying Raoult or colligative formulas; a single trusted oracle speeds grading without hand-waving floating-point noise. Process engineers convert plant laboratory mass assays written as percent into mole-fraction feeds for flash, distillation, and reactor models that expect x and y vectors rather than weight percent. Environmental notebooks normalize measured weight-percent solutes in aqueous samples into mole fractions when comparing to ideal-solution partial-pressure estimates.

Materials and polymer labs report monomer feed on a mass-percent basis from scales but need mole fractions for kinetic stoichiometry. If you later need mole fraction directly from component moles without mass data, conversion from dimensionless mass fractions already in zero to one rather than percent, molality from moles and solvent kilograms, automatic formula-to-molar-mass tables, or multi-component mass-percent vectors, treat those as separate search intents and landings rather than overloading this binary mass-percent to mole-fraction calculator page.

Process assay to simulation feed

Turn lab weight-percent assays into mole-fraction compositions before flash, distillation, or reactor model inputs.

Colligative and VLE prep

Obtain dimensionless mole fractions from wt% labels before Raoult, Dalton, or freezing-point depression calculations.

What happens if a molar mass is zero?

Mole amounts divide by molar mass, so a zero M is rejected instead of returning Infinity or NaN.

What units should molar masses use?

Any consistent mass-per-mole unit works (commonly g/mol). Both species must use the same unit so the ratio w/M is meaningful.

What does it cost?

The browser tool is free and runs locally.

Why is the mole fraction so much lower than the mass percent?

Because water is much lighter per mole than salt: 18.015 g/mol against 58.44 g/mol. The same gram of mixture holds far more moles of water, so salt at 20% of the mass makes up only about 7% of the moles.

Do the solute and solvent mole fractions add up to one?

Yes. The mixture is treated as two components, so the solvent is everything the solute is not. You get both mole fractions, the mass fractions and the moles behind them, and the two mole fractions always sum to one.

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/mass-percent-to-mole-fraction

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/mass-percent-to-mole-fraction \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"solute_mass_percent":20,"solute_molar_mass":58.44,"solvent_molar_mass":18.015}'
{
  "solute_mass_percent": 20,
  "solute_molar_mass": 58.44,
  "solvent_molar_mass": 18.015
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "chem.mass_percent_to_mole_fraction",
  "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.

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 molar mass is rejected with a clear invalid_input error so a bad denominator never becomes Infinity or NaN.

How mass percent converts to mole fraction

The solute mole fraction is then x_s equals n_s divided by the sum n_s plus n_v, which expands to the closed form x_s equals open parenthesis open parenthesis p over one hundred close parenthesis over M_s close parenthesis over open parenthesis open parenthesis p over one hundred close parenthesis over M_s plus open parenthesis open parenthesis one hundred minus p close parenthesis over one hundred close parenthesis over M_v close parenthesis. If either molar mass is zero the division is undefined, and this capability fails with invalid_input rather than inventing Infinity. The arithmetic is deterministic floating-point with no random seeds, wall-clock timestamps, or network calls, so identical inputs always produce identical JSON. This landing intentionally stays on the binary mass-percent to mole-fraction conversion; multi-component tables, formula-based molar-mass lookup, molality, and molarity remain separate search intents.

What you send and what you get back

Classic textbook checks include twenty weight percent sodium chloride in water with M_s of fifty-eight point forty-four and M_v of eighteen point zero one five, fifty weight percent ethanol–water with M near forty-six and eighteen, and a pure solvent limit where solute mass percent is zero giving mole fraction zero. Wire the free browser form for homework and quick sanity checks, then call the identical contract from scripts when you need bulk answer keys or grading oracles. Send three required fields: solute_mass_percent as a finite number in the closed interval from zero to one hundred (use twenty for twenty weight percent solute; solvent is taken as one hundred minus that value for a binary mixture), plus solute_molar_mass and solvent_molar_mass as finite positive numbers in grams per mole or any consistent mass-per-mole unit. Missing fields, non-numeric strings, NaN, Infinity, mass percent outside zero to one hundred, negative molar masses, and zero molar mass fail with invalid_input and are not charged. On success the response echoes the cleaned three inputs, adds solvent_mass_percent and both dimensionless mass fractions for transparency, provides moles_solute_per_unit_mass, moles_solvent_per_unit_mass, and total_moles_per_unit_mass for intermediate checks, returns mole_fraction_solute as the primary dimensionless result, includes mole_fraction_solvent for convenience, attaches a units hint object, sets method to mass_percent_to_mole_fraction, and formula to the closed form above so lab notebooks can cite the same expression. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.

Where mass-percent to mole conversion shows up in real work

Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.

Homework weight-percent drills

Convert solute mass percent plus molar masses into x_solute so students and auto-graders share one closed-form ground truth.

How do you convert mass percent to mole fraction?

For a binary mixture, set w_s = p/100 and w_v = (100−p)/100, form moles per unit mass as w/M for each species, then x_solute = (w_s/M_s) / (w_s/M_s + w_v/M_v). Both molar masses must be positive.

Is solvent mass percent required as input?

No. For a binary mixture the solvent mass percent is taken as 100 − solute_mass_percent. The response echoes that derived value.

Read the full KIT documentation →