If an onshore/offshore bond is partially encashed to meet expenses in a particular year, how is this taxed?

We calculate what the chargeable gain is as a percentage of the whole bond at the time of withdrawal, and then use this percentage to calculate the chargeable gain on the amount of bond that is being withdrawn to meet expenses. 

We then apply income tax to the chargeable gains accordingly. For onshore bonds, this is 0% for non and basic rate taxpayers, 20% for the higher rates, and 25% for additional higher rate taxpayers. For offshore bonds, this is 0% for non-taxpayers, 20% for basic rate, 40% for higher rate and 45% for additional higher rate tax payers.