Calculate pH, pOH, [H+], and [OH-] concentrations instantly.
Hydrogen Ion Concentration [H+] (mol/L)
Hydroxide Ion Concentration [OH-] (mol/L)
pH Value
pOH Value
How to Use the pH Calculator
Calculating the acidity or alkalinity of a solution is fundamental in chemistry. This calculator allows you to input various known values to find the remaining chemical properties of a solution at 25°C (298K).
Common Inputs:
Hydrogen Ion Concentration [H+]: The molarity of H+ ions in the solution.
Hydroxide Ion Concentration [OH-]: The molarity of OH- ions in the solution.
pH Value: The negative base-10 logarithm of the H+ concentration.
pOH Value: The negative base-10 logarithm of the OH- concentration.
The Science of pH Calculation
The pH scale typically ranges from 0 to 14, although values can technically fall outside this range for extremely concentrated solutions. The formula used is:
pH = -log10[H+]
Since the product of [H+] and [OH–] always equals 10-14 in water at room temperature (Kw), we use the following relationships:
pH + pOH = 14
[H+] = 10-pH
[OH–] = 10-pOH
Common pH Reference Table
Substance
Typical pH
Classification
Battery Acid
0.0 – 1.0
Strong Acid
Lemon Juice
2.0 – 3.0
Acidic
Black Coffee
5.0
Weakly Acidic
Pure Water
7.0
Neutral
Baking Soda
8.0 – 9.0
Weakly Basic
Bleach
11.0 – 13.0
Strongly Basic
Real-World Examples
Example 1: If you have a solution with a Hydrogen ion concentration of 0.001 mol/L (1 x 10-3), the calculation would be: pH = -log10(0.001) = 3. This solution is acidic.
Example 2: A solution has a pH of 12. To find the H+ concentration: [H+] = 10-12 mol/L. This solution is basic.
function updatePlaceholders() {
var type = document.getElementById("inputType").value;
var input = document.getElementById("calcValue");
var label = document.getElementById("valueLabel");
if (type === "h_ion") {
input.placeholder = "e.g. 1e-7";
label.innerText = "Hydrogen Ion Concentration [H+] (mol/L)";
} else if (type === "oh_ion") {
input.placeholder = "e.g. 1e-7";
label.innerText = "Hydroxide Ion Concentration [OH-] (mol/L)";
} else if (type === "ph_val") {
input.placeholder = "e.g. 7.4";
label.innerText = "pH Value (0 – 14)";
} else if (type === "poh_val") {
input.placeholder = "e.g. 6.6";
label.innerText = "pOH Value (0 – 14)";
}
}
function calculatePH() {
var type = document.getElementById("inputType").value;
var inputVal = parseFloat(document.getElementById("calcValue").value);
var resultBox = document.getElementById("phResultBox");
var primaryRes = document.getElementById("primaryResult");
var description = document.getElementById("phDescription");
var secondaryRes = document.getElementById("secondaryResults");
if (isNaN(inputVal) || inputVal <= 0 && (type === "h_ion" || type === "oh_ion")) {
alert("Please enter a valid positive number.");
return;
}
var ph, poh, hConc, ohConc;
var kw = 1e-14;
if (type === "h_ion") {
hConc = inputVal;
ph = -Math.log10(hConc);
poh = 14 – ph;
ohConc = kw / hConc;
} else if (type === "oh_ion") {
ohConc = inputVal;
poh = -Math.log10(ohConc);
ph = 14 – poh;
hConc = kw / ohConc;
} else if (type === "ph_val") {
ph = inputVal;
poh = 14 – ph;
hConc = Math.pow(10, -ph);
ohConc = Math.pow(10, -poh);
} else if (type === "poh_val") {
poh = inputVal;
ph = 14 – poh;
hConc = Math.pow(10, -ph);
ohConc = Math.pow(10, -poh);
}
// Formatting results
primaryRes.innerHTML = "pH: " + ph.toFixed(2);
var descText = "";
var bgColor = "";
if (ph 7.5) {
descText = "This solution is Basic (Alkaline).";
bgColor = "#e3f2fd";
} else {
descText = "This solution is Neutral.";
bgColor = "#f1f8e9";
}
description.innerText = descText;
resultBox.style.backgroundColor = bgColor;
resultBox.style.display = "block";
secondaryRes.innerHTML =
"pOH: " + poh.toFixed(2) + "" +
"[H+]: " + hConc.toExponential(4) + " mol/L" +
"[OH–]: " + ohConc.toExponential(4) + " mol/L";
}