Calculating pH and pOH