# pH calculator for acids, bases and buffers

> Calculate pH, pOH, [H⁺] and [OH⁻] from a concentration, a strong acid or base, a weak acid's Ka or pKa, or a Henderson–Hasselbalch buffer.

النسخة التفاعلية: https://www.calcopenly.com/ar/science/ph-calculator
الموضوع: حاسبات العلوم

pH is the negative base-10 logarithm of the hydrogen-ion concentration, pH = −log₁₀[H⁺]. At 25 °C the ion product of water, Kw, is 1.0 × 10⁻¹⁴, so pH + pOH = 14. Strong acids and bases are treated as fully dissociated, with water's own ions included; weak acids are solved exactly from Ka with the quadratic x² + Ka·x − Ka·C = 0; buffers use the Henderson–Hasselbalch equation.

The default, 0.1 mol/L acetic acid with Ka = 1.8 × 10⁻⁵, gives pH 2.88 with 1.33 % of the acid ionised. The √(Ka·C) shortcut taught in class gives pH 2.872, because it overstates [H⁺] by 0.67 %.

Concentrations stand in for activities, which works best for dilute solutions. Results below pH 0 or above 14 are possible for concentrated acids and bases, but there the simple formula is only an estimate.

## المدخلات

- **Start from** (الخيارات: [H⁺] concentration, [OH⁻] concentration, pH value, Strong acid concentration, Strong base concentration, Weak acid (Ka), Buffer (Henderson–Hasselbalch))
- **Concentration**
- **Concentration unit** (الخيارات: µmol/L, mmol/L, mol/L)
- **H⁺ or OH⁻ released per formula unit**: 2 for Ba(OH)₂; H₂SO₄'s second proton is only partly dissociated
- **⁨pH⁩**
- **Acid strength given as** (الخيارات: Ka, pKa)
- **Ka**
- **pKa**
- **Conjugate base [A⁻]**
- **Weak acid [HA]**

## النتائج

- ⁨pH⁩ — النتيجة الرئيسية
- pOH
- [H⁺] (mol/L)
- [OH⁻] (mol/L)
- Solution is
- pH with the √(Ka·C) shortcut
- Shortcut error in [H⁺]
- Fraction ionised

## الصيغة

$$
\text{pH} = -\log_{10}[\mathrm{H^+}],\ \text{pH} + \text{pOH} = 14;\quad x^2 + K_a x - K_aC = 0;\quad \text{pH} = \text{p}K_a + \log_{10}\frac{[\mathrm{A^-}]}{[\mathrm{HA}]}
$$

## أمثلة محلولة

### [H⁺] = 0.001 mol/L

- Start from: [H⁺] concentration
- Concentration: 0.001
- Concentration unit: mol/L
- **⁨pH⁩: 3.00**
- **pOH: 11.00**
- **Solution is: Acidic**
- مصدر التحقق: ⁨−log₁₀(10⁻³) = 3; pOH = 14 − 3⁩

### pH 7 is neutral

- Start from: pH value
- ⁨pH⁩: 7
- **[H⁺]: 1 × 10⁻⁷ mol/L**
- **[OH⁻]: 1 × 10⁻⁷ mol/L**
- **Solution is: Neutral**
- مصدر التحقق: ⁨10⁻⁷ mol/L at 25 °C (Kw = 10⁻¹⁴)⁩

### 0.01 M HCl

- Start from: Strong acid concentration
- Concentration: 0.01
- Concentration unit: mol/L
- H⁺ or OH⁻ released per formula unit: 1
- **⁨pH⁩: 2.00**
- مصدر التحقق: ⁨Python 3.8 decimal: [H⁺] = (C + √(C² + 4Kw))/2 = 0.010000000001 ⇒ pH 2.0000⁩

### Very dilute HCl (1e-8 M) is still acidic

- Start from: Strong acid concentration
- Concentration: 1e-8
- Concentration unit: mol/L
- H⁺ or OH⁻ released per formula unit: 1
- **⁨pH⁩: 6.98**
- **[H⁺]: 1.05125 × 10⁻⁷ mol/L**
- مصدر التحقق: ⁨Python 3.8 decimal: [H⁺] = (10⁻⁸ + √(10⁻¹⁶ + 4×10⁻¹⁴))/2 = 1.0512492×10⁻⁷ ⇒ pH 6.97829 (not 8)⁩

### 0.1 M acetic acid, Ka = 1.8e-5

- Start from: Weak acid (Ka)
- Concentration: 0.1
- Concentration unit: mol/L
- Acid strength given as: Ka
- Ka: 1.8e-5
- **⁨pH⁩: 2.88**
- **pH with the √(Ka·C) shortcut: 2.872**
- **Shortcut error in [H⁺]: 0.67%**
- مصدر التحقق: ⁨Python 3.8 decimal: x = (−Ka + √(Ka² + 4KaC))/2 = 1.33267×10⁻³ ⇒ pH 2.87528; √(KaC) ⇒ 2.87236⁩

### Buffer with [A⁻] = 2[HA]

- Start from: Buffer (Henderson–Hasselbalch)
- pKa: 4.76
- Conjugate base [A⁻]: 0.2 mol/L
- Weak acid [HA]: 0.1 mol/L
- **⁨pH⁩: 5.06**
- مصدر التحقق: ⁨Python 3.8 decimal: 4.76 + log₁₀2 = 5.0610300⁩

## الأسئلة

### How do you calculate pH from concentration?

For a strong acid, [H⁺] equals the acid concentration times the protons each unit releases, and pH = −log₁₀[H⁺]: 0.01 M HCl has pH 2.00. For a strong base, take pOH = −log₁₀[OH⁻] and subtract it from 14: 0.005 M Ba(OH)₂ releases 0.01 M OH⁻, so pOH is 2 and pH is 12. Weak acids only partly ionise, so they also need Ka.

### Why is the pH of pure water 7?

Water ionises slightly, H₂O ⇌ H⁺ + OH⁻, and at 25 °C the product [H⁺][OH⁻] equals Kw = 1.0 × 10⁻¹⁴. In pure water the two concentrations are equal, so each is 10⁻⁷ mol/L and the pH is 7. Kw grows with temperature: at 50 °C pKw is 13.26, so neutral water has pH 6.63. This calculator uses the 25 °C value.

### What is the difference between Ka and pKa?

Ka is the acid dissociation constant, [H⁺][A⁻]/[HA] at equilibrium, and pKa = −log₁₀Ka. A lower pKa means a stronger acid, and each unit of pKa is a factor of 10 in Ka. Acetic acid has pKa 4.76, so Ka = 1.74 × 10⁻⁵ (often rounded to 1.8 × 10⁻⁵); hydrofluoric acid, Ka = 6.8 × 10⁻⁴, has pKa 3.17.

### When is the Henderson–Hasselbalch equation accurate?

pH = pKa + log₁₀([A⁻]/[HA]) holds when the acid and its conjugate base are both far more concentrated than Ka and [H⁺], and their ratio lies between 0.1 and 10, which keeps the pH within one unit of pKa. Outside that ratio the buffer has little capacity left, and the calculator warns you. Equal concentrations give pH = pKa, so a 1:1 acetate buffer sits at 4.76.

### Can pH be negative?

Yes. A 2 mol/L solution of a strong acid such as HCl has [H⁺] of about 2 mol/L, and −log₁₀2 gives pH −0.30. At concentrations like this, ion activities differ markedly from concentrations, so a pH electrode reads a different value. Treat any calculated pH below 0 or above 14 as an estimate rather than a measurement.

### ما مدى دقة «⁨pH calculator for acids, bases and buffers⁩»؟

تعتمد الدقة على مدخلاتك وافتراضات الطريقة. يستخدم الحساب العشري 50 رقمًا معنويًا، لكن التقديرات والأساليب العددية وبيانات المصدر قد تكون أقل دقة؛ تقريب القيم المعروضة لا يزيل هذه الحدود. أمثلة محلولة جرى التحقق منها بمصادر مستقلة: 8. مثلًا، يجري التحقق من «⁨[H⁺] = 0.001 mol/L⁩» بالرجوع إلى ⁨−log₁₀(10⁻³) = 3; pOH = 14 − 3⁩.

### ما مصدر هذه الطريقة؟

OpenStax Chemistry 2e, §14.2 pH and pOH; §14.3 Relative strengths of acids and bases; §14.6 Buffers; IUPAC Gold Book — pH; ionic product of water (Kw = 1.0 × 10⁻¹⁴ at 25 °C).

## المصادر

- [OpenStax Chemistry 2e, §14.2 pH and pOH; §14.3 Relative strengths of acids and bases; §14.6 Buffers](https://openstax.org/books/chemistry-2e/pages/14-2-ph-and-poh)
- [IUPAC Gold Book — pH; ionic product of water (Kw = 1.0 × 10⁻¹⁴ at 25 °C)](https://goldbook.iupac.org/terms/view/P04524)
