Calculate pH with Keq
Use this interactive equilibrium calculator to estimate the pH of a weak acid or weak base from its equilibrium constant and starting concentration. It solves the quadratic expression directly for better accuracy than the simple approximation when the equilibrium shift is not negligible.
For a weak acid, the calculator finds [H+] from Ka = x² / (C – x). For a weak base, it finds [OH-] from Kb = x² / (C – x), then converts to pH.
Enter a Ka or Kb value and an initial concentration, then click Calculate pH.
How to calculate pH with Keq
When students search for a way to calculate pH with Keq, they are usually working with a weak acid or weak base that does not fully ionize in water. In these cases, pH cannot be found by simply assuming complete dissociation the way you would for a strong acid like HCl or a strong base like NaOH. Instead, you use an equilibrium expression that links the equilibrium constant to the concentrations of species present once the system settles into equilibrium. This page gives you both the calculator and the chemistry logic behind it.
The symbol Keq is a broad way of writing an equilibrium constant. In acid-base chemistry, you will more often see the specialized forms Ka for acid dissociation and Kb for base dissociation. For a weak monoprotic acid HA in water, the equilibrium is:
The corresponding expression is:
If the initial concentration of the weak acid is C and the amount that dissociates is x, then at equilibrium the concentrations become [H+] = x, [A-] = x, and [HA] = C – x. That gives:
Now solve for x. Once x is found, pH is:
For a weak base B, the logic is very similar. The equilibrium can be written as:
Then:
In this case x is the equilibrium hydroxide concentration. You first compute pOH, then convert to pH:
Why the quadratic solution matters
In many textbook problems, instructors teach the shortcut x ≈ √(Keq × C). This is derived by assuming that x is small compared with the initial concentration C, so C – x is treated as simply C. That approximation is often useful, especially for weak acids and bases with modest dissociation. However, it starts to break down when the equilibrium constant is relatively large compared with the concentration or when the starting concentration is very small. The calculator above lets you choose the exact quadratic method because it is more reliable and avoids hidden approximation errors.
Starting from:
you rearrange to:
Solving the quadratic gives the physically meaningful positive root:
That value of x becomes either [H+] for a weak acid or [OH-] for a weak base. This is the core calculation that the tool performs on button click.
When the shortcut is acceptable
- The acid or base is weak, so Keq is small.
- The initial concentration is not extremely dilute.
- The calculated percent dissociation is small, often less than about 5% as a rough classroom rule.
- Your assignment or exam explicitly allows the approximation.
When you should avoid the shortcut
- Keq is not tiny relative to concentration.
- The concentration is low enough that x is no longer negligible.
- You need higher numerical accuracy for lab analysis.
- You are checking edge cases or comparing systems across a broad concentration range.
Step by step example using a weak acid
Suppose you have acetic acid with Ka = 1.8 × 10-5 and an initial concentration of 0.100 M. The equilibrium setup is:
- Write the reaction HA ⇌ H+ + A-.
- Use an ICE framework: initial C, 0, 0; change -x, +x, +x; equilibrium C – x, x, x.
- Substitute into the equilibrium expression: Ka = x² / (C – x).
- Insert values: 1.8 × 10-5 = x² / (0.100 – x).
- Solve with the quadratic formula or the approximation.
- Take pH = -log10(x).
The result is a pH near 2.88, which matches the expected behavior of a weak acid at this concentration. If you used the shortcut x ≈ √(KaC), you would get a very similar answer because acetic acid at 0.100 M dissociates only slightly.
Step by step example using a weak base
Now consider ammonia as a weak base with Kb = 1.8 × 10-5 at 0.100 M. The equilibrium setup is:
- Write the base reaction B + H2O ⇌ BH+ + OH-.
- Set [B] = C – x and [OH-] = x at equilibrium.
- Use Kb = x² / (C – x).
- Solve for x, which is [OH-].
- Calculate pOH = -log10(x).
- Convert to pH with pH = 14.00 – pOH at 25 C.
This gives a pH a little above 11, which fits the expected chemistry for a weak base. The exact value depends on the concentration and whether the approximation is used.
Reference data for common weak acids and bases
The table below lists representative acid and base constants commonly used in introductory chemistry. These values are typical room temperature references and are useful for classroom calculations. Always verify the constants required by your instructor or your lab manual.
| Species | Type | Approximate constant at 25 C | Typical use in pH calculations |
|---|---|---|---|
| Acetic acid, CH3COOH | Weak acid | Ka = 1.8 × 10-5 | Household vinegar and buffer examples |
| Hydrofluoric acid, HF | Weak acid | Ka = 6.8 × 10-4 | Stronger weak acid comparison |
| Carbonic acid, H2CO3 | Weak acid | Ka1 = 4.3 × 10-7 | Environmental and biological systems |
| Ammonia, NH3 | Weak base | Kb = 1.8 × 10-5 | Classic weak base equilibrium |
| Pyridine, C5H5N | Weak base | Kb = 1.7 × 10-9 | Organic chemistry equilibrium example |
How concentration changes pH for weak equilibria
One of the most important ideas in acid-base equilibrium is that pH changes with both the equilibrium constant and the starting concentration. A stronger weak acid has a larger Ka and usually gives a lower pH at the same concentration. A more concentrated weak acid also shifts the equilibrium to produce a higher absolute amount of H+, even if the percent dissociation becomes smaller. The opposite idea holds for weak bases and OH- production.
The chart generated by the calculator is designed to help visualize this relationship. It plots pH across a concentration range centered on the user input, while keeping the same Ka or Kb. This is useful because it turns the calculation into a trend, not just a single number. If you are studying for an exam, understanding the trend is what makes it easier to solve unfamiliar problems quickly.
| System | Keq used | Initial concentration | Approximate pH at 25 C |
|---|---|---|---|
| Acetic acid | Ka = 1.8 × 10-5 | 0.001 M | 3.89 |
| Acetic acid | Ka = 1.8 × 10-5 | 0.010 M | 3.38 |
| Acetic acid | Ka = 1.8 × 10-5 | 0.100 M | 2.88 |
| Ammonia | Kb = 1.8 × 10-5 | 0.001 M | 10.11 |
| Ammonia | Kb = 1.8 × 10-5 | 0.010 M | 10.62 |
| Ammonia | Kb = 1.8 × 10-5 | 0.100 M | 11.12 |
Common mistakes when trying to calculate pH with Keq
- Using the wrong constant. Ka belongs to acids and Kb belongs to bases. If you only know one value for a conjugate pair, remember that Ka × Kb = Kw.
- Forgetting to convert to pH correctly for bases. Weak base calculations usually produce [OH-], which means you must calculate pOH first.
- Ignoring temperature assumptions. The familiar pH + pOH = 14.00 relation is specific to a common reference temperature near 25 C.
- Applying complete dissociation to a weak species. That overestimates [H+] or [OH-] and gives the wrong pH.
- Dropping the x term too soon. The small x approximation is a convenience, not a law.
How this calculator handles the chemistry
This calculator asks for the system type, the equilibrium constant, and the initial concentration. After you click the button, the script reads all inputs, chooses either the acid or base branch, solves for x using either the quadratic or approximation method, and formats the result in a result panel. It also displays percent ionization, the equilibrium hydronium or hydroxide concentration, and the corresponding pOH when relevant. The chart is then rendered with Chart.js so you can see how pH shifts across a concentration range around your chosen concentration.
That chart has a practical value beyond appearance. Many students can compute a single pH but still struggle to predict what happens when concentration changes by a factor of ten. A visual graph makes it clear that pH does not change linearly with concentration because the equilibrium expression and the logarithmic pH scale both shape the outcome.
Authority sources for acid-base equilibrium
If you want to verify constants or review equilibrium concepts from trusted institutions, these sources are excellent starting points:
- LibreTexts Chemistry for broad college-level equilibrium explanations.
- U.S. Environmental Protection Agency for real-world acid-base relevance in environmental systems.
- University of Wisconsin chemistry resources for instructional acid-base equilibrium material.
- National Institute of Standards and Technology for scientific reference and measurement standards.
Final takeaway
To calculate pH with Keq, first identify whether the system is an acid or a base, then write the correct equilibrium expression and connect it to an ICE style setup. For a weak monoprotic acid or weak base, the result often reduces to the same core equation, x² / (C – x) = Keq. Solving that equation gives the equilibrium concentration of H+ or OH-. From there, convert to pH. If you want the most dependable answer across a wide range of concentrations, use the quadratic solution. If you are in a classroom setting where the weak dissociation is very small, the square root shortcut may be acceptable. Either way, understanding what x means and how it relates to pH is the real key.