Premium apps Part of Proofline
Solution, Gas Law & pH Calculator
Molarity, dilution, mass ↔ moles ↔ particles, ideal gas with partial pressures, pH and buffers.
Try an example: Molarity of 5.844 g NaCl in 250 mL · Dilute 12 M hydrochloric acid to 500 mL of 1 M · Molecules in a spoon of water (18 g) · Volume of 1 mol of gas at 0 °C and 1 atm · Partial pressures of dry air at 1 atm · pH of 0.1 M acetic acid · Acetate buffer with a 1.5 : 1 ratio · pH of 0.02 M barium hydroxide
How it works
One calculator for the everyday quantities of solution chemistry, with units you type yourself (250 mL, 0.1 M, 25 °C, 1 atm): molarity from mass and volume or any of the three from the other two, dilutions with C1·V1 = C2·V2, mass, moles and particles of a formula, the ideal gas law solved for any variable with Dalton partial pressures of a mixture, and the pH of strong and weak acids and bases (exact quadratic and full charge balance) and of buffers (Henderson–Hasselbalch checked against the exact result). Part of the Proofline math notebook.
- Quantities are read with their units and converted to mol, g, L, Pa and K. Molar masses come from the formula (CIAAW standard atomic weights) or the number you give.
- Molarity c = n / V with V the final volume of solution; dilution conserves the solute, C1·V1 = C2·V2; particles N = n·N_A with the exact Avogadro constant.
- Ideal gas: p·V = n·R·T with the exact molar gas constant R = 8.314462618… J/(mol·K), solved for the empty quantity. Mixtures: mole fractions xᵢ = nᵢ / n and partial pressures pᵢ = xᵢ·p (Dalton).
- pH at 25 °C with Kw = 1.0 × 10⁻¹⁴: strong acids and bases from the charge balance [H⁺] = c + Kw/[H⁺]; weak acids and bases from the textbook quadratic x² + K·x − K·c = 0 and from the full charge balance including water, solved by bisection; the shortcut √(K·c) is shown with the 5 % check. Buffers: Henderson–Hasselbalch pKa + log([A⁻]/[HA]) next to the exact charge balance [H⁺] + c(A⁻) = [A⁻] + [OH⁻].
Dilute-solution model: activities are taken as concentrations, so pH values above about 0.1 M ionic strength and below pH 1 are approximate. Real gases deviate from the ideal gas law at high pressure. Nothing here is advice on handling chemicals safely.
Sources
- D. C. Harris: Quantitative Chemical Analysis, 9th ed., chapters 8–9 (systematic treatment of equilibrium, monoprotic acids and bases, buffers) (W. H. Freeman)
- P. Atkins, J. de Paula: Physical Chemistry, chapter 1 (the perfect gas, Dalton’s law) (Oxford University Press)
- CODATA recommended values of the fundamental physical constants (Avogadro and molar gas constants, electron mass) (NIST)
- CIAAW / IUPAC: Abridged Standard Atomic Weights (latest table, incl. the 2021 revisions) (IUPAC Commission on Isotopic Abundances and Atomic Weights)
Part of Proofline
-
Proofline Math notebook
Solve, graph, test and visualise in one notebook — with data, findings and a report.
Related tools
- Molar Mass & Composition Calculator – Molar mass with uncertainty, mass % per element and the empirical formula from percentages.
- Chemical Equation Balancer & Stoichiometry – Balance any reaction or redox equation exactly, then find the limiting reagent and yields.
- Numerical Equation Solver & Optimizer – Every root of f(x) = 0 in an interval, Newton or bisection steps, systems and minima.
- Curve Fitter & Regression Calculator – Fit lines, polynomials, exponentials or your own model: parameters, R², errors, residuals.
How to calculate molarity, dilutions, gas volumes and pH
Work out molarity, C1·V1 = C2·V2 dilutions, grams to moles, the ideal gas law with partial pressures and the pH of acids, bases and buffers, with units you type.
What it is for
This is the everyday calculator of the chemistry lab, in five modes. Molarity links the amount of solute, the volume of solution and the concentration — fill in two, leave one empty. Dilution solves C1·V1 = C2·V2 for the empty value. Mass ↔ moles ↔ particles converts between grams, moles and the number of molecules. Ideal gas solves p·V = n·R·T and splits a mixture into partial pressures. pH handles strong and weak acids and bases and buffers.
You type quantities with their units: 250 mL, 0.1 M, 5.844 g, 25 °C, 1 atm, 1.5e23 molecules. Molar masses come from the formula you enter, using IUPAC atomic weights.
The pH mode assumes a dilute solution at 25 °C, where concentrations stand in for activities. It is not for concentrated acids.
Worked example
Dissolve 5.844 g of NaCl and make it up to 250 mL. The steps read n = m / M = 5.844 g ÷ 58.44 g/mol = 0.1 mol, then c = 0.1 mol ÷ 0.25 L, so the solution is 0.4 mol/L (23.376 g/L).
To dilute 12 M hydrochloric acid to 500 mL of 1 M, leave V1 empty: take 41.6667 mL of the stock and add 458.333 mL of water.
For gases, 1 mol at 1 atm and 0 °C occupies 22.414 L. Dry air at 1 atm and 25 °C, entered as a mixture of nitrogen, oxygen, argon and carbon dioxide, gives each gas its partial pressure: 0.7808 mol of N₂ out of 1 mol means 0.7808 atm.
The pH of 0.1 M acetic acid with Ka 1.8e-5 is 2.88: [H₃O⁺] is 0.001333 mol/L and 1.333 % of the acid is dissociated. An acetate buffer with 0.1 M acid, 0.15 M acetate and pKa 4.76 has pH 4.94; Henderson–Hasselbalch gives 4.9361 and the exact charge balance 4.9362.
How to read the result
The value that was calculated is highlighted; the others repeat your inputs in consistent units. In pH mode, the pH by method table compares the exact result with the textbook shortcuts. For weak acids, the quadratic solution ignores water and the √(K·c) shortcut ignores the depletion of the acid; when they disagree with the exact value, the tool warns you.
A good example is very dilute hydrochloric acid, 1e-8 M: the simple −log c says pH 8, which would be basic. The exact value, which includes the ions from water itself, is 6.98.
For buffers, a callout explains when Henderson–Hasselbalch holds: a base-to-acid ratio between 0.1 and 10 and concentrations far above [H₃O⁺] and [OH⁻].
Tips and common mistakes
- In molarity mode the volume is the final volume of solution, not the volume of water you add.
- Leave exactly one field empty in the molarity, dilution and gas modes; the tool says which ones it needs.
- Write
pKa 4.76orKb 1.8e-5to say which constant you mean. A bare number is Ka for acids and Kb for bases. - For an NH3/NH4+ buffer you may enter the pKb of ammonia (4.75); it is converted to the pKa of the ammonium ion.
- Mixtures can be given as masses (
CO2 = 2.2 g); each formula supplies its own molar mass.
FAQ
Why does it give three pH values for a weak acid?
They come from three levels of approximation. The exact value solves the full charge balance; the others show what the usual classroom shortcuts would give.
Can it handle sulfuric or phosphoric acid?
Partly. As a strong acid with 2 H⁺ per formula unit, sulfuric acid is assumed fully dissociated, which slightly overstates its acidity. Polyprotic weak acids are treated as monoprotic.
What standard conditions does the gas mode use?
None — you enter the temperature and pressure yourself. 0 °C and 1 atm give 22.414 L/mol; 0 °C and 100 kPa give 22.711 L/mol.
Does it work offline in Proofline?
Yes. The Proofline chemistry cell runs the same engine in your browser and returns the same numbers.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://prooflinesolutioncalculator.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://prooflinesolutioncalculator.usefulweb.site/mcp· tool nameproofline_solution_calculator
Example request
curl -s -X POST https://prooflinesolutioncalculator.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"mode":"molarity","formula":"NaCl","solute":"5.844 g","volume":"250 mL"}'