pH calculations for buffer solutions