Hello Everyone,
Yes, I too am noticing very high rates as compared to the UPS and FedEx website calculated rates. I can only speak for our case when it comes to shipping. Most of the boxes we ship are roughly square. So the cube root method makes sense to us. Very rarely do we ever ship anything that has a 1 inch facing on the box... So for us the following code doesn't apply:
//sometimes we have products with sizes like 1x1x20
//that's why let's ensure that a maximum dimension is always preserved
//otherwise, shipping rate computation methods can return low rates
if (width < maxProductWidth)
width = maxProductWidth;
if (length < maxProductLength)
length = maxProductLength;
if (height < maxProductHeight)
height = maxProductHeight;
I see why it was done. But to tell you the truth it doesn't really apply much in when you are shipping with either UPS or FedEx as long as it doesn't end up being an oversize package by looking at billable and dimensional weight:
UPS CalculationsFedEx CalculationsI ran through the code on scratch paper with two identical items that measure 22 x 17 x 10. So it looks like this:
h = 22
w = 17
l = 10
3740 cubic inches...
The code then finds the cube root and assigns the value equally to all three sides:
h = 15.5
w = 15.5
l = 15.5
Then it goes back and assigns max height, width and length...
h = 22
w = 17
l = 15.5
That leaves you with 5797 cubic inches. That is 35.48% higher than it should be. If you get into larger packages that kind of difference can easily turn a package that is not oversized into an oversized package further compounding the issue. My solution was to dim out the code that uses maximum sizes. At the end of the day, the rates seem to be much closer for us.
With UPS then look at your dimensional and actual weight and charge you for the greater of the two:
Dimensional Weight for Domestic Air Shipments: (H x W x L)/166
Dimensional Weight for Domestic Ground Shipments < 5184 Cubic Inches = Actual Weight (UPS ONLY)Dimensional Weight for Domestic Ground Shipments >= 5184 = (H x W x L)/166
Dimensional Weight for International Shipments (H x W x L)/139
All figures are rounded up to the next pound. So the above example ends up like this at 5797 cubic inches:
Dimensional Weight for Domestic Air Shipment: 35lbs
Dimensional Weight for Domestic Ground Shipment: 35lbs
Dimensional Weight for International Shipment: 42lbs
Without the MaxHeight/MaxLenght/MaxWidth permutation it looks like this:
Dimensional Weight for Domestic Air Shipment: 35lbs
Dimensional Weight for Domestic Ground Shipment: 14lbs <-- less than 5184 cubic inches use actual weight (UPS)Dimensional Weight for Domestic Ground Shipment: 22lbs <-- (FedEx Will Use This)Dimensional Weight for International Shipment: 42lbs
There isn't much of a difference when you are dealing with heavy items or items that you are shipping internationally.
Now on the flip side of the coin we have to consider oversize packages. These are packages where the girth (2 x H) + (2 x W) > 130 inches. In those cases then you have to worry about the MaxHeight/MaxLenght/MaxWidth because they are billed at a higher rate.
Maybe what should be done is to apply that code only if the two largest values of the MaxHeight/MaxLenght/MaxWidth multiplied by two exceed 130 inches.
And yes, I agree...it is a complicated scenario and there is no easy way to calculate this accurately.