pH of an Extremely Dilute Acid
Problem
What is the pH of a 10^{8} molar HCl solution?
Compare the numerical result of aqion with the analytical solution of the corresponding equations.
1. Numerical Solution with aqion
We begin with pure water (button H2O), then click on Reac and enter for “HCl” the value 1e5 mmol/L, as shown in the right screenshot. (Please mind the concentration units: 10^{8} mol/L = 10^{5} mmol/L.)
Start the calculation by clicking on the Start button. The result appears immediately:
pH = 6.98 
The highly diluted HCl solution (in contrast to pure water) decreases the pH by a tiny amount from 7 to 6.98.
2. Analytical Solution (Theory)
Let us abbreviate the total HCl concentration by C_{T} = 10^{8} M. The math system involves three unknowns: [H^{+}], [OH^{}], and [Cl^{}]. So we need three equations:
(1.1)  strong acid (completely dissociated):  [Cl^{}] = C_{T} 
(1.2)  charge balance:  [H^{+}] = [OH^{}] + [Cl^{}] 
(1.3)  selfionization of water:  K_{w} = [H^{+}] [OH^{}] = 10^{14} 
Inserting the first two equations into the third yields a quadratic equation in x = [H^{+}]:
(2)  x^{2} – C_{T} x – K_{w} = 0 
The (nonnegative) solution for x is
(3)  \(x \ = \ \dfrac{C_T}{2}\, \left\{ 1 + \sqrt{1+\dfrac{4K_w}{C_T^2}} \,\right\}\) 
After inserting the numbers into the equation we get:
(4)  \(x \ = \ \dfrac{1.0\cdot 10^{8} M}{2} \, \left( 1 + \sqrt{\strut 1+400} \ \right) \ = \ 10.51 \cdot 10^{8} M\) 
The negative decadic logarithm of x defines the pH^{1}
(5)  pH = –lg [H^{+}] = –lg x = 6.978 
This is in perfect agreement with the numerical result above.^{2}
Pitfalls
One often makes the mistake of identifying the H^{+} concentration with that of HCl, that is, setting [H^{+}] = 10^{8} M into the last equation:
(6)  pH = –lg [H^{+}] = –lg 10^{8} = 8  ⇐ that’s wrong 
This is definitely wrong, because an acid (no matter how much you dilute it) cannot have a pH value above 7. Where does the fallacy lie?
The answer is simple: We ignored the 10^{7} mol/L H^{+} that comes from the selfionization of water — see 1.3. To this “background concentration” of 1.0·10^{7} M we should add the small amount of 0.1·10^{7} M from HCl.
Further Reading
 the difference between weak and dilute acids – see here
 analytical equations for Nprotic acids – see here
Remarks & Footnotes

The good news: No activity corrections need to be made for these extremely small concentrations. ↩

The program outputs pH values with only two significant digits (which is for almost all practical applications reasonable). Internally, however, aqion works with high numerical precision (e.g. pH = 6.978060). ↩