FLXCode pH Calculator

FLXCode apps

Appearance

pH Calculator

Type a substance and its concentration. The pH of a solution or a mixture updates as you type.

Skip to the results
Formulas

    No materials yet. Add one below, or start from an example: or a standard buffer:

    Water (balance)100wt %

    My materials (0)

    Your own grades, commercial grades with their hidden acid or alkali, acids or bases, and bleach liquor from a spec sheet. They stay on this device and show up in the search.

    pH

    No ads. No account. Nothing you type or record is uploaded. We count page events with a daily code. Check it. What this tool keeps and sends.

    Problem or idea? Email us

    Quick start

    1. Type a substance in the box under the table, such as HCl, acetic acid or ammonia, and pick it from the list.
    2. Type the concentration in mol/L (the unit a new row starts with here) or switch the unit to wt %.
    3. Read the pH on the right. Add more rows for a mixture, and the pH of the whole mixture updates.

    Your rows are kept in this browser. The same formula opens on the titration curve and the formulation pages, which show the titration curve of the mixture and how much acid or base reaches a target pH.

    How to calculate pH from molarity

    pH is the negative logarithm of the activity of the hydrogen ion: pH = -log a(H+). In a dilute solution that is close to -log of its concentration, and the textbook formulas below use that. The calculator does not stop there. It solves every equilibrium in the solution and corrects for ionic strength with the Davies equation, so each example shows the textbook value next to the calculator value at 25 °C.

    Strong acid

    A strong acid is fully ionised, so [H+] equals its concentration c and pH = -log c.

    0.01 M HCl: pH = 2.00 from the formula. The calculator gives 2.04. The activity of H+ is lower than its concentration, so the real pH is a little higher.

    Strong base

    For a strong base, [OH-] equals c. Find pOH = -log c, then pH = 14 - pOH at 25 °C.

    0.01 M NaOH: pOH = 2.00, so pH = 12.00 from the formula. The calculator gives 11.95, because the activity of OH- is also below its concentration.

    Weak acid

    A weak acid HA only partly ionises: Ka = [H+][A-] / [HA]. If x is the amount that ionises, Ka = x² / (c - x). The exact answer is the quadratic x = (-Ka + √(Ka² + 4 Ka c)) / 2. When x is small next to c, the shortcut pH = -log √(Ka c) = ½ (pKa - log c) is enough.

    Acetic acid has pKa 4.756, so Ka = 1.75×10-5. For 0.1 M the shortcut gives pH 2.88, the quadratic 2.88 and the calculator 2.88. All three agree, because only about 1 % of the acid ionises.

    The shortcut fails when the acid is dilute or strong. For 0.0001 M acetic acid, about 34 % ionises. The shortcut gives pH 4.38, but the quadratic gives 4.47 and the calculator 4.47. A rule of thumb: the shortcut is safe when c is more than about 100 times Ka and less than 5 % of the acid ionises.

    Weak base

    Use the same steps with Kb = Kw / Ka of the conjugate acid, then pOH = ½ (pKb - log c) and pH = 14 - pOH. The ammonium ion has pKa 9.245, so ammonia has pKb 4.755.

    0.1 M ammonia: the shortcut gives pH 11.12 and the calculator 11.12.

    Buffer

    A buffer holds a weak acid and its conjugate base. The Henderson-Hasselbalch equation is pH = pKa + log([A-] / [HA]). It uses the amounts you mixed and ignores the small amount that ionises, and it ignores activity. The buffer calculator gives the grams to weigh for a target pH.

    0.1 M acetic acid with 0.05 M NaOH is half neutralised: 0.05 M acetate and 0.05 M acetic acid. The equation gives pH = pKa = 4.76. The calculator gives 4.67. The ionic strength is 0.05 mol/kg here, which lowers the activity of acetate and moves the pH by about 0.1.

    The equation breaks down when the buffer is dilute or lopsided. Take 0.001 M acetic acid with 0.0001 M NaOH. The equation gives 3.80. The acid ionises by about as much as the base added, so the real pH is higher: the calculator gives 4.09.

    pH of common solutions

    From the calculator, at 25 °C with the Davies equation. Pick the same row in the tool to see the full result.

    SolutionpH
    0.1 M hydrochloric acid1.10
    0.01 M sodium hydroxide11.95
    1 wt % sodium hydroxide13.27
    0.1 M acetic acid2.88
    Vinegar, 5 wt % acetic acid2.41
    1 wt % citric acid2.23
    0.1 M sodium bicarbonate (baking soda)8.12
    0.1 M sodium carbonate (washing soda)11.39
    0.1 M ammonia11.12
    Acetate buffer: 0.1 M acetic acid, 0.05 M NaOH4.67

    Real vinegar, baking soda and washing soda are not pure, and the strength on the label is rounded, so a meter reading can differ by a few tenths.

    pH of a mixture

    Add a row for each substance. The calculator keeps the amount of each one, solves the charge balance and every acid-base pair together, and reports one pH for the mixture. This is how it gets the buffer above without a special case: the acetate comes from acetic acid and sodium hydroxide reacting. A salt such as sodium acetate or sodium bicarbonate works the same way, and so does a strong acid added to a weak base.

    Standard buffers

    The tool holds the pH standards of IUPAC (2002) and NIST. Open the Formulas menu, pick Standard buffers, and a standard loads as a new formula that you can change. While you have not edited it, the pH tab shows the certified value and the difference.

    BufferCompositionCertified pH(S), 25 °CThis toolDifference
    Tartratesaturated KHC4H4O6, 0.0341 mol/kg3.5573.555-0.002
    Citrate0.05 mol/kg KH2C6H5O73.7763.769-0.007
    Phthalate0.05 mol/kg KHC8H4O44.0054.012+0.007
    Phosphate0.025 mol/kg KH2PO4 + 0.025 mol/kg Na2HPO46.8656.876+0.011
    Phosphate0.008695 mol/kg KH2PO4 + 0.03043 mol/kg Na2HPO47.4137.420+0.007
    Borax0.01 mol/kg Na2B4O79.1809.176-0.004
    Carbonate0.025 mol/kg NaHCO3 + 0.025 mol/kg Na2CO310.01210.003-0.009
    Tetroxalate (secondary)0.05 mol/kg KH3C4O81.681.674-0.006
    Tris (secondary)0.05 mol/kg Tris-HCl + 0.01667 mol/kg Tris7.707.680-0.020
    Borax (secondary)0.05 mol/kg Na2B4O79.199.130-0.060

    The primary standards come out within 0.011 of the certified value. The NIST certificates of the same salts (SRM 185i, 186g, 187f, 188, 189c, 191d) give values within 0.015 of the IUPAC table. Not in the database yet, so not offered: saturated calcium hydroxide, sodium hydrogen diglycolate and piperazine phosphate.

    The menu also has 21 common lab buffers: phosphate, acetate, citrate, carbonate-bicarbonate, borate, Tris and HEPES. Their composition was computed with this tool for the pH at 25 °C. They are not certified standards, and a buffer made up at the bench depends on the purity of the salts and on the temperature.

    Sources: Buck RP et al., Measurement of pH. Definition, standards, and procedures (IUPAC Recommendations 2002), Pure Appl Chem 74(11):2169-2200, doi 10.1351/pac200274112169, Tables 1 to 3. NIST Certificates of Analysis for SRM 185i, 186g, 187f, 188, 189c, 191d and 2193b. The certificate for SRM 186g has expired and is used as a cross-check only.

    Sources

    The acid constants, the constant of water and the other values come from the database of this tool, and each one has a source. See Values and sources for every material, or the pKa table for the pKa of each acid and base. The box "How this was calculated" under the result lists the constants used for your solution, with the reference for each. The activity model is the Davies equation up to an ionic strength of 0.5 mol/kg and the Pitzer model above it (setting Activity model, Auto by default). The examples on this page were all run with Davies.

    Beyond one substance in water, the formulation pH calculator finds the amount of acid or base for a target pH, draws a titration curve and shows the pH after dilution.

    FAQ

    Why is the result different from -log c?

    The textbook formula treats concentration as if it were activity. In a real solution the ions attract each other, so the activity of H+ is a little lower than its concentration. The pH calculator uses the Davies equation for that, so a 0.01 M HCl solution reads a bit above 2.00, as the strong acid example on this page shows.

    How do I find the pH of a mixture?

    Add one row for each substance and type its concentration in the final mixture. The calculator solves all the acids, bases and the water together, so a buffer, a salt of a weak acid or an acid with some base all work. If you mix two solutions, work out the concentration of each in the combined volume first: equal volumes of two solutions give half the concentration of each.

    What is the difference between wt % and mol/L?

    wt % is grams of the substance in 100 g of the solution, so it needs no density. mol/L is moles in a litre of solution, so the tool needs the density of the solution to compare it with the mass of water. It uses the density of water at the temperature you set and the result says so. For a dilute solution the difference is small.

    Does temperature change the pH?

    Yes. The T box sets the temperature of the calculation, and the equilibrium constants are moved to it with the temperature data in the database, including the constant of water. A neutral solution is not pH 7 at every temperature. The box "How this was calculated" under the result lists the constants and where they come from.

    How accurate is it?

    For clean aqueous solutions up to an ionic strength of about 0.5 mol/kg it should be close to a calibrated glass electrode, if the substances are what you typed. Davies is a screening model, so the badge says when a result is only approximate. How well it matches your own solutions has not been measured yet.

    More from FLXCode

    • Formulation pH CalculatorpH of a cleaner formula in wt %, the acid or base for a target pH, a titration curve and the pH after dilution.
    • Molarity CalculatorSolve for molarity, mass, moles or volume. Type a formula for the molar mass and see every step with your numbers.
    • Dilution Calculator (C1V1 = C2V2)Solve C1V1 = C2V2 for any one value. Units in M, mM, µM, % and mg/mL, L to µL. Shows the solvent to add.
    • Titration Curve CalculatorTitration curve in mL with equivalence points and half-equivalence pH. Strong and weak acids, bases, polyprotic acids.

    Share pH Calculator