How do you calculate the capital gains tax on shares?

What is the method for determining the tax liability on profits from share sales?