Duty is based on the value of the shipping including postage costs.
The first go to place to get the shipment value is on the declaration made by the seller on the customs label. Chinese sellers are notorious for declaring a low value but customs officials are quite wise to this. If they pick out an item and think the seller has falsified the declaration they we assign a value which is often too high because they base it on UK prices.
Anyway, say the seller’s declaration is accepted. Import charges are made up of two parts, VAT and duty. VAT is 20% but not charged on items where the value (excluding postage) is £15 or less. Duty varies depending on the type of item - it is typically 3-5% but they don’t bother for items under £135 (excluding shipping). When charged, VAT and duty are both calculated on the total value including shipping.
If customs decide the seller has falsified the value and gets caught I imagine that as an innocent party you would be able to appeal. For example, say you paid £100 for the item but the seller puts £10 on the label. Customs officials look up the type of product from a UK supplier and decide it is £300 and invoice you import charges based on that - I suspect that could appeal providing your actual purchase details showing that you paid £100.
There is a third charge - this is an admin charge made by the courier for making payment on your behalf to speed the package through customs. These vary from courier to courier and they may vary the charge depend on the value of the shipment. I generally figure on £15.
NB all this only applies if you package gets picked out. It may be that it goes through unchecked and then there is nothing to pay. I imagine the bigger the physical parcel the less likely this is.
Cheers,
Nigel