Excel guide · 4 min read
How to calculate shipping cost by weight in Excel
=CEILING(MAX(weight,dim_weight),1), then find the rate with =INDEX(rates,MATCH(billable,A2:A7,1),MATCH(zone,B1:E1,0)). MATCH with 1 finds the band the weight falls into.Sample data
Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | C | D | E | F | G | H | I | J | K | L | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | From lb | 2 | 3 | 4 | 5 | Order | Weight lb | L in | W in | H in | Zone | |
| 2 | 1 | 8.2 | 8.55 | 8.95 | 9.4 | 1001 | 0.6 | 9 | 6 | 2 | 2 | |
| 3 | 2 | 9.1 | 9.6 | 10.25 | 10.9 | 1002 | 2.3 | 12 | 10 | 4 | 4 | |
| 4 | 3 | 9.85 | 10.45 | 11.3 | 12.1 | 1003 | 4 | 16 | 12 | 10 | 3 | |
| 5 | 5 | 11.4 | 12.3 | 13.65 | 14.8 | 1004 | 7.8 | 14 | 10 | 8 | 5 | |
| 6 | 10 | 15.75 | 17.2 | 19.4 | 21.6 | 1005 | 1 | 10 | 8 | 3 | 2 | |
| 7 | 20 | 24.9 | 27.8 | 31.5 | 35.2 | 1006 | 12.5 | 20 | 14 | 10 | 4 |
Download this sheet as an Excel practice file (.xlsx)
Step 1: Set up the rate table
You sell on Etsy or your own shop and want to know what each order really costs to ship. Copy your carrier's rate chart into a table: the starting weight of each band down column A (1, 2, 3, 5, 10, 20 lb) and the zones across row 1 (2 to 5). The numbers in this sample are made up; use your own carrier's.
Each row means "from this weight up to the next row". So the row for 5 covers 5 up to (but not including) 10 lb. Column A must be sorted smallest to largest, or the band lookups below give wrong answers with no error.
For a single zone, XLOOKUP with match mode -1 (exact or next smaller) is the simplest: =XLOOKUP(N2,$A$2:$A$7,$B$2:$B$7,,-1) finds the zone 2 rate for each billable weight: 8.20, 9.85, 15.75, 11.40, 9.10 and 24.90.
Result: spills 6 rows × 1 column
| 8.2 |
| 9.85 |
| 15.75 |
| 11.4 |
| 9.1 |
| 24.9 |
8.20, 9.85, 15.75, 11.40, 9.10, 24.90: the zone 2 rate for each order's billable weight.
Step 2: Round up and add dimensional weight
Carriers bill whole pounds and most round any fraction up, so 2.3 lb is billed as 3. CEILING(x,1) rounds up to the next whole number. CEILING(x,0.5) would round to the next half pound if your carrier works that way.
Big, light boxes are billed by size. Dimensional weight is L x W x H in inches divided by the carrier's divisor (139 and 166 are common for inches and pounds, 5000 for centimetres and kilograms). Keep the divisor in an input cell, Q2, and bill whichever is higher, the real weight or the dim weight.
Order 1003 weighs 4 lb, but its 16 x 12 x 10 box has a dim weight of 13.81 lb, so it's billed at 14. That's the order that surprises people. Some carriers only apply dim weight above a certain box size, so check your carrier's rules.
Result: 14
14: order 1003 is billed on its 13.81 lb dimensional weight, rounded up, not its real 4 lb.
Step 3: Two-way lookup by weight and zone
With several zones, you need a row (the weight band) and a column (the zone). INDEX picks the cell where they cross. The first MATCH uses 1 to find the band the billable weight falls into. The second uses 0 for an exact zone match.
In Excel 365 one formula fills the whole column: 8.20, 11.30, 17.20, 14.80, 9.10 and 31.50, a total of 92.10. In older Excel, use the single-row version (N2 and L2) and fill it down.
Order 1003 costs 17.20 at its billable 14 lb. At its real 4 lb it would have been 10.45. The 6.75 difference comes from the box size, which is the case for a smaller box.
Result: spills 6 rows × 1 column
| 8.2 |
| 11.3 |
| 17.2 |
| 14.8 |
| 9.1 |
| 31.5 |
8.20, 11.30, 17.20, 14.80, 9.10, 31.50: each order's rate for its billable weight and zone.
Step 4: Free shipping and what the customer pays
If you offer free shipping over 75, the customer pays 0 when the order total is 75 or more. IF handles it: =IF(M2>=$Q$3,0,rate). Keep the threshold in Q3 so you can test 50 or 100 and see the effect.
Keep two numbers apart: what the carrier charges you (92.10 for these six orders) and what customers pay (60.10). Orders 1003 and 1004 ship free, but you still pay 17.20 and 14.80 for them. That gap is part of your cost per order.
Result: 60.1
60.10: what customers pay for shipping across the six orders after free shipping on 1003 and 1004.
Step 5: Weights the table doesn't cover
A weight below the first band has nothing to match, so XLOOKUP(0.6,...) returns #N/A. Rounding up with CEILING first avoids that, because 0.6 becomes 1. If a 0 or blank weight can sneak in, wrap the lookup in IFERROR(...,"Check weight").
Weights above the last band get the last band's rate. If your carrier charges differently over 20 lb, or you want to quote those by hand, add a check: =IF(N2>20,"Quote",rate).
Result: #N/A
#N/A: 0.6 lb is below the first band, so there's nothing to look up. Round the weight up first.
Common mistakes
Rate bands not sorted
Approximate MATCH and VLOOKUP TRUE need the weight column sorted smallest to largest. Sort it, or results are silently wrong.
Looking up the real weight, not the billable one
Round up with CEILING and compare with the dim weight first, or your estimate comes in under the invoice.
Zone typed as text in one table
A zone typed as "4" won't match the number 4 in the header. Keep both as numbers, or both as text.
Mixing carrier cost and customer price
Free shipping sets the customer's price to 0, not your cost. Keep both columns.
FAQ
Can I use VLOOKUP for shipping rates?
Yes. =VLOOKUP(N3,$A$2:$E$7,MATCH(L3,$A$1:$E$1,0),TRUE) returns 11.30 for order 1002. TRUE gives an approximate match on the sorted weight column, and MATCH finds the zone column.
How do I calculate shipping cost per pound?
If your carrier charges a flat rate per pound, it's =CEILING(weight,1)*rate_per_lb, plus any base fee. Most carriers use bands instead, which is what the table above handles.
How do I convert kilograms to pounds in Excel?
Multiply by 2.20462, or use =CONVERT(A2,"kg","lbm"). Convert before rounding up, so 1.2 kg (2.65 lb) is billed as 3 lb.
What if my carrier uses half-pound bands?
Use CEILING(weight,0.5) and put 0.5, 1, 1.5 and so on in the band column. The INDEX MATCH formula stays the same.
Functions used
CEILINGRounds up to a multipleMAXLargest numberXLOOKUPModern lookup in any directionINDEXValue at a positionMATCHPosition of a valueVLOOKUPVertical lookupIFPicks a result from a testSUMAdds numbersIFERRORFallback when a formula errors
Related guides
- How to look up which range a number falls in
- How to do a two-way lookup in Excel
- ROUND vs ROUNDUP vs ROUNDDOWN in Excel
- VLOOKUP vs XLOOKUP
- Excel formulas cheat sheet: the 25 everyone should know
- How to calculate a weighted score in Excel
- Tiered commission in Excel: sliding-scale formulas that match your plan
Updated