Shipping costs can quietly erase the profit on an online order. You price a product carefully, then discover the label cost more than you expected because the box was a little too big, the address was residential or the package went across the country instead of across the state. If you do not know what an order will cost to ship before you set prices and shipping charges, you are guessing with your margin.
This guide explains how to calculate shipping costs for ecommerce orders step by step. You will learn the factors carriers use to price a package, how to work out dimensional weight, how zones and surcharges change the price, how to estimate an average shipping cost for your store, and how to use those numbers when you set prices and shipping charges at checkout.

The five factors that set a shipping price
Every major carrier prices a domestic parcel using some combination of these:
- Weight: The actual weight of the packed box, including packaging.
- Dimensions: Length, width and height, used to calculate dimensional weight.
- Distance (zone): How far the package travels, grouped into zones based on the origin and destination.
- Service level: Ground, two-day, overnight and other speeds.
- Surcharges: Extra charges for things like residential delivery, remote areas, oversized or irregular packages, and peak seasons.
Your shipping software or the carrier’s rate calculator combines these into a price. Understanding each one lets you predict costs accurately and reduce them over time.
Step 1: Weigh and measure accurately
Weigh the fully packed box, not just the product. Packaging, inserts and cushioning add weight, and carriers typically round fractional pounds up to the next whole pound for billing on most services. Measure the outside of the box at its longest points. For dimensional weight, fractional inches are rounded up as well, so a box measuring 12.25 inches counts as 13.
Keep a reference sheet listing each product with its packed weight and box size. That sheet becomes the foundation for every calculation in this guide.
Step 2: Calculate dimensional weight
Carriers charge for the space a package takes up as well as its weight. The billable weight is whichever is greater: the actual weight or the dimensional weight.
Dimensional weight = (length x width x height) / divisor
FedEx and UPS use a divisor of 139 for published daily rates on all package sizes. USPS also uses 139, but applies dimensional weight only to packages larger than 1 cubic foot (1,728 cubic inches) on services such as Priority Mail, Priority Mail Express, Ground Advantage and Parcel Select; Flat Rate packaging is exempt.
Worked example: a pillow ships in a box measuring 16 x 14 x 10 inches and weighs 4 pounds packed.
- Volume: 16 x 14 x 10 = 2,240 cubic inches
- Dimensional weight: 2,240 / 139 = 16.1, which rounds up to 17 pounds
- Billable weight: 17 pounds, because 17 is greater than the actual 4 pounds
Now try a smaller box, 14 x 12 x 8 inches, with the pillow compressed. Volume is 14 x 12 x 8 = 1,344 cubic inches, and 1,344 / 139 = 9.7, which rounds up to 10 pounds. Just by changing the box, the billable weight drops from 17 to 10 pounds.

Step 3: Understand zones
Carriers divide the country into zones based on the distance between where a package starts and where it is delivered. Zone 1 or 2 is local or nearby, and higher zones are farther away. The same package costs more to ship to a higher zone.
To see how this affects your store, look at where your customers actually live. A seller whose customers are mostly in-state will see lower average costs than one whose customers are spread across both coasts. Your shipping software or past order history can show your zone mix.
Step 4: Account for surcharges
Surcharges often explain the gap between the rate you expected and the rate you paid. Common ones include:
- Residential delivery: FedEx and UPS often add a charge for delivering to homes rather than businesses, which matters for most online stores.
- Delivery area surcharges: For rural or remote addresses.
- Additional handling: For heavy, long, or irregular packages, or items not fully enclosed in a corrugated box.
- Oversize: For very large packages. FedEx and UPS limit parcels to 150 lb, a maximum length of 108 inches and 165 inches in length plus girth. USPS limits packages to 70 lb and 130 inches in length plus girth.
- Peak or demand surcharges: Temporary charges during busy seasons.
- Address correction: Charged when a carrier has to fix an incorrect address.
Surcharge amounts change, so check each carrier’s current service guide or your shipping software rather than relying on old figures.
Step 5: Calculate your average shipping cost per order
You cannot price every order individually in advance, but you can calculate a realistic average. Use real data if you have it, or estimate with a sample.
- Pull your last 100 orders, or a sample of typical orders if you are new.
- Note the actual label cost of each, including surcharges.
- Add them up and divide by the number of orders.
Worked example: in a sample of 10 orders, label costs were $8, $9, $7, $12, $9, $15, $8, $10, $9 and $13. The total is $100, so the average shipping cost is 100 / 10 = $10 per order. Notice that two orders at $15 and $13 pushed the average up. Checking why (larger box, farther zone) may point to savings.
It also helps to calculate shipping cost as a share of order value. If your average order is $50 and your average shipping cost is $10, shipping equals 10 / 50 = 20 percent of each sale. Tracking that percentage each month shows whether rising rates, heavier products or more distant customers are squeezing your margin, even when the dollar amount per order looks similar.
If you are new and have no history, use your shipping software to quote your three most common products to a handful of addresses in different zones, then average those quotes.

Step 6: Use the numbers to set prices and shipping charges
Once you know your average shipping cost, you can decide how to handle it:
- Build it into product prices and offer free shipping.
- Charge a flat rate close to your average, accepting that some orders cost more and some less.
- Offer free shipping above a threshold where the order value can absorb the cost.
- Use calculated rates so customers pay the actual cost for their address.
Using the example above, a store with a $10 average shipping cost might charge a $6.95 flat rate and add about $3 to product prices, so the business is still covering roughly the full cost of shipping on a typical order.
Ways to lower your shipping costs
- Right-size your boxes to reduce dimensional weight.
- Use poly mailers for soft, unbreakable items.
- Compare carriers on every order with multi-carrier software.
- Use commercial or software-discounted rates rather than paying retail counter prices for every label.
- Validate addresses at checkout to avoid correction fees.
- Review invoices for adjustments, where the carrier re-measured or re-weighed a package.
Frequently asked questions
How do carriers calculate shipping costs?
They combine billable weight (actual or dimensional, whichever is greater), distance zone, service level and any surcharges that apply to the package or address.
What is the dimensional weight divisor?
FedEx and UPS use 139 for published rates. USPS uses 139 for packages over 1 cubic foot on eligible services.
Why did my label cost more than the estimate?
Common reasons are residential or remote-area surcharges, an underestimated box size, or a carrier adjustment after re-measuring.
How do I estimate shipping costs before launching a store?
Weigh and measure your packed products, then quote them to several addresses in different zones using shipping software or carrier rate calculators.
Not sure which box or service is cheapest?
Sometimes it helps to compare options in person. The Postal Spot, an authorized UPS shipping outlet in Houston, also ships FedEx and USPS, so staff can compare services for your package.