pH is the concentration of hydrogen ions in a solution. A solution with a high concentration of hydrogen ions is acidic. A solution with few hydrogen ions is basic, also known as alkaline.
The variable we need is the concentration of H+ ions which can be represented in two ways:
The pH scale is calculated by means of a negative logarithm. A negative logarithm simply indicates how many times a number should be divided. The pH equation can be written as follows:
There are cases in which they do not give us the concentration of H+ ions, but instead, give us the concentration of OH- ions, [OH-]. There is a variable that allows us to associate these two concentrations, it can be written as Kw is represented by the following equation:
Kw is the equilibrium constant of a substance. This constant we can find in reported and help us to know the pH value when we have OH- ions concentration.