Are you trying to figure out dimensional weight? That is done by multiplying the 3 numbers and then dividing the total by 5000.
34x31x21=22134
22134 divided into 5000 = 4.43kg (5kg)
The price is based on the actual weight or dimensional weight, whichever is greater.
Canada Post automatically figures that out when you print a label. But it looks if ebay shipping does not do that automatically for Fedex so you would enter whichever weight is greater.
If you are looking at the 'learn more' info under the Fedex label it also explains how to figure out the girth but that is not for pricing, that is to make sure that you don't go over the maximum allowed.