Choose a bottle from the shelf and read its pH. Then dilute it, add a drop of acid or base, and see which ions and which protonation states of the acid really exist in the beaker.
Each button computes a table with the exact solver (starting from the liquid and dilution selected above).
The science
What pH is. pH = -log10 a(H+); here activity is replaced by the concentration of H3O+ (ideal solution). Water autoionises, Kw = [H+][OH-] = 10-14 at 25 °C, so pure water has pH 7 and no dilution can push an acid past 7.
The exact solver. For an acid system HnA with successive constants K1...Kn the fraction with j protons lost is αj = (K1...Kj/[H]j) / Σi (K1...Ki/[H]i). The unknown [H+] is the root of the charge balance [H+] + [Na+] + CtΣj αj(ztop - j) = [OH-] + [Cl-], found by bisection in log [H+] (the left minus right side is monotonic in [H+], so there is exactly one root). Nothing is approximated: no "x is small" shortcut, water included.
Weak acids. For a monoprotic acid HA of total concentration C the textbook result is [H+] = (-Ka + √(Ka2 + 4KaC))/2 and the degree of ionisation follows Ostwald's dilution law α ≈ √(Ka/C) when α is small: diluting 100 times raises α only 10 times, so the pH of a weak acid rises about 0.5 per decade, while a strong acid rises by 1 per decade. Ammonia is treated through its conjugate acid NH4+ (pKa 9.25).
Buffers. Adding strong acid or base to a mixture of an acid and its conjugate base changes pH little: pH = pKa + log([A-]/[HA]) (Henderson-Hasselbalch). The buffer capacity is β = dnbase/dpH = 2.303([H+] + [OH-] + CtΣj αj(j - 〈j〉)2), largest when pH = pKa. The "Buffer test" experiment shows that pure water has none: 1 mmol of HCl in 110 mL moves it by about five pH units.
Simplifications, stated honestly. Ideal solutions: no activity coefficients (they matter above about 0.01 M ionic strength; a real meter does not read exactly 0 for 1 M HCl), 25 °C only, no CO2 exchange with air for the open beaker (the rain item assumes equilibrium with 420 ppm, giving pH 5.6), no ion pairing. The shelf formulations are illustrative round numbers (real products vary: lemon juice is roughly pH 2.0 to 2.6, cola 2.4 to 2.6, household bleach contains some extra NaOH). "Typical measured" values in the readouts are approximate textbook figures, not data. Particle counts in the 3D beaker are logarithmic, not proportional. Reagents are 0.1 M, so 1 mmol adds 10 mL and slightly dilutes the sample, which the solver includes.
Typical constants to spot-check: acetic acid pKa 4.76; citric acid 3.13 / 4.76 / 6.40; phosphoric acid 2.15 / 7.20 / 12.35; carbonic acid 6.35 / 10.33; HOCl 7.53; NH4+ 9.25.