What is the formula to calculate pH?

A. pH = -log[OH-]
B. pH = -log[H+]
C. we do not need a formula, we can just estimate

B. pH = -log[H+]