The strength of an acid can be determined by considering the extent to which it dissociates in a given solvent (i.e. to which side this equilibrium lies):

The equilibrium constant in water is given by:

Note that the H2O term has been incorporated into Ka, as water (the solvent) is in vast excess, and hence the value of its concentration will change negligibly.

Ka is known as the acidity constant of the acid.  Its value will only be approximate if concentrations are used as shown above; strictly the activities of the species involved should be used.  However, using concentrations will be fairly accurate provided the solution is dilute.  Generally, the numerical value of Ka will be small, and for this reason, Ka is usually converted into pKa by the following equation:

For example, for methanoic acid, pKa = 3.77

Thus, the smaller the value of pKa, the stronger the acid.

Similarly, the strength of a base is determined by using pKb.  For the example of BOH, a base, in water, Kb can be determined by the following formula:

Again, note that the H2O term has been incorporated into Kb, as water is in excess.  pKb can be found from Kb in exactly the same manner as pKa can be found from Ka.