if you use a calculator that will handle logarithms, it is a very simple calculation. First you enter the hydronium ion concentration. You can use decimal format or scientific notation. Next push the log button. Then change the sign by pushing the +/- button.
From the data given above, the pH will be -log[5.4x10-9] = 8.26