Blog

How to Set Up Weight-Based Shipping Rates in WooCommerce

Weight based shipping in WooCommerce: $6.95 up to 5 lb, $12.95 up to 20 lb, then $1 a lb, with a 21 lb cart charged $13.95

Weight-based shipping in WooCommerce means the shipping price follows the weight of the whole cart: $6.95 up to 5 lb, $12.95 up to 20 lb, then $1 for every extra pound. WooCommerce can’t do this on its own. Its Flat rate cost field only knows the number of items and the order cost, and shipping classes are set per product, so the cart’s total weight is never checked.

To charge real weight tiers you need a table rate shipping plugin (or custom code). We set up that same rate card 4 ways in a test WooCommerce store, with shipping classes (3 variants) and with a plugin, and recorded what 6 carts cost each time. This post shows the results, the shipping class workaround some guides suggest (and the carts it gets wrong), the plugin setup step by step, and the item-count version for stores that charge by quantity.

The rate card we want

The example store sells heavy home goods: plant pots at 3.5 lb each and a leather sling chair at 18 lb. The owner wants one shipping price for the whole order, based on its total weight:

Cart weightShipping
0 to 5 lb$6.95
Over 5 lb, up to 20 lb$12.95
Over 20 lb$12.95 + $1 for every started pound over 20

So 2 pots (7 lb) should cost $12.95 to ship, 6 pots (21 lb) $13.95, and the chair plus one pot (21.5 lb) $14.95, because the half pound counts as a started pound.

Does WooCommerce have weight-based shipping?

No. WooCommerce stores a weight for every product (Product data > Shipping > Weight), but none of its own shipping methods (Flat rate, Free shipping, Local pickup) prices by it. The Flat rate shipping docs list [qty] (number of items) and [fee] (a percentage fee) for the Cost field. We checked the Flat rate code in WooCommerce 11.2.1: it also replaces [cost] (the order cost) and nothing else. There is no weight placeholder, and the formula is plain arithmetic: no rounding up, no “if over 20”.

That leaves shipping classes, a workaround some guides suggest (WPBeginner’s first method, for example).

The shipping class workaround, tested

The idea: make one shipping class per weight band, put each product in the band its own weight falls in, and give each class a price in Flat rate. We did exactly that:

  1. In WooCommerce > Settings > Shipping > Classes, add 2 classes: “Under 5 lb” and “5 to 20 lb”.
  2. In each product, open Product data > Shipping and choose the class: the pots, vases and jars go in “Under 5 lb”, the chair in “5 to 20 lb”.
  3. In WooCommerce > Settings > Shipping, open your zone, edit Flat rate, leave Cost empty and enter 6.95 and 12.95 as the class costs.
  4. Choose a Calculation type: “Per order” charges only the most expensive class in the cart, “Per class” adds up the cost of every class.
WooCommerce Flat rate settings with shipping class costs of $12.95 for 5 to 20 lb and $6.95 for under 5 lb, calculation type per order
WooCommerce’s own Flat rate method with one shipping class per weight band.

Then we put 6 carts through it, once with each calculation type and once with 6.95 * [qty] style class costs (a price per item), and compared the result with the rate card:

CartWeightShould costPer orderPer classPer class × qty
1 pot3.5 lb$6.95$6.95$6.95$6.95
2 pots7 lb$12.95$6.95$6.95$13.90
6 pots21 lb$13.95$6.95$6.95$41.70
Chair18 lb$12.95$12.95$12.95$12.95
Chair + 1 pot21.5 lb$14.95$12.95$19.90$19.90
Chair + 2 pots25 lb$17.95$12.95$19.90$26.85

Each setup gets only 2 of the 6 carts right. A shipping class describes one product, not the box you ship. Six 3.5 lb pots are still “Under 5 lb” products, so “per order” and “per class” charge $6.95 for 21 lb, while multiplying by [qty] overshoots to $41.70.

WooCommerce cart with 2 Eucalyptus pots weighing 7 lb charged $6.95 standard shipping by the shipping class workaround
2 pots, 7 lb in total, still ship for the under-5 lb price.

Shipping classes are still the right tool when each product ships in its own box, for example furniture that always goes out separately. Then a per-item class cost with [qty] is accurate. They can’t price a mixed box by its total weight.

What about a code snippet?

A developer can add up the cart weight and overwrite the Flat rate price with the woocommerce_package_rates filter. It works, but the snippet also has to recalculate the tax on shipping (changing the cost alone leaves the old tax), and every price change means editing code. For one fixed table that never changes, it’s an option. For tiers you will adjust, per-zone prices or a freight cut-off, a plugin is easier to live with.

Set up weight-based shipping in WooCommerce with a plugin

We used our Table Rate Shipping Rules plugin, which adds a “Table rate rules” method to WooCommerce shipping zones. Each rule checks the cart (weight, number of items, order value, volume or shipping class) and sets a price: a fixed amount, plus an amount per item and an amount per weight step.

Table Rate Shipping Rules in 20 seconds.

If simple weight tiers are all you need, a free plugin such as Weight Based Shipping for WooCommerce on WordPress.org handles them, and WooCommerce.com sells official paid extensions such as Table Rate Shipping. Ours also adds a Shipping rates block that shows your prices to customers on any page, and an “add $X more for cheaper shipping” message in the cart.

Here is the rate card from above, in the same store:

  1. Check your weights. Every shipped product needs a weight in Product data > Shipping, in the unit set in WooCommerce > Settings > Products > General (lbs here). A product without a weight counts as 0 lb.
  2. Go to WooCommerce > Settings > Shipping, open your zone (United States here) and add the Table rate rules method. Disable the old Flat rate in that zone, or customers see both.
  3. Open the method. Set Name at checkout to “Standard shipping” and keep Charge shipping on “Once for the whole order”, so the rules measure the whole cart.
  4. Click Add rule: Condition Weight, from 0 to 5, Fixed price 6.95. Tick Stop checking rules after this one. The first tier that matches the cart then sets the price, and the rules below it are skipped.
  5. Add a second rule: Weight from 5 to 20, Fixed price 12.95, and tick Stop checking rules after this one again.
  6. Add a third rule: Weight from 20, “to” left empty, Fixed price 12.95, and Plus per weight $1.00 for every 1 lb above 20.
  7. Optional, for heavy orders: add a rule with Weight from 70, tick Hide this shipping method instead and write a message such as “Orders over 70 lb ship by freight. Contact us for a quote.” Add rule puts it at the bottom, so drag it to the top (or use its arrow buttons). Rules are checked from top to bottom, and a hide rule placed below a matching rule with Stop ticked is never reached. At the top it keeps working even if you later tick Stop on the last tier or add rules below it. Save.
Weight based shipping rules for WooCommerce in Table Rate Shipping Rules: hide over 70 lb, 0 to 5 lb $6.95, 5 to 20 lb $12.95, over 20 lb $12.95 plus $1 per lb
The whole rate card as 4 rules. “Stops here” marks the rules that end the check.

The per-pound part lives in the third rule. “For every 1 lb above 20” charges each started pound in full, so 21.5 lb is 2 steps ($14.95). To charge in coarser steps, change the numbers: $4.00 for every 5 lbs above 20 charges $4 for anything over 20 lb up to 25 lb.

Rule for 20 lb and over with a fixed price of $12.95 plus $1.00 per weight for every 1 lb above 20

With these rules, all 6 test carts cost exactly what the rate card says: $6.95, $12.95, $13.95, $12.95, $14.95 and $17.95. Four chairs (72 lb) got no Standard shipping at all, and the cart showed the freight message instead. The Table Rate Shipping Rules docs explain the CSV export and import, which is quicker than the rules editor when your table is long.

Here is how the 4 rules priced the 6-pot cart (21 lb), checked from top to bottom:

Diagram of the 4 weight rules checked from top to bottom for a 21 lb cart, which only the 20 lb or more rule matches for $13.95

WooCommerce shipping based on quantity

Some stores price by the number of items instead: light products of similar size, where a count is close enough to weight. Here WooCommerce does more on its own.

A base price plus a price per item works in Flat rate. We entered 4.95 + 1.50 * [qty] as the Cost and got $6.45 for 1 milk bottle, $7.95 for 2, $10.95 for 4 and $16.95 for 8. If that straight line is your pricing, you don’t need a plugin.

Tiers by item count (“1 to 2 items $5.95, 3 to 5 items $8.95, 6 or more $11.95”) need rules again, because the Cost formula can’t say “if”. In Table Rate Shipping Rules, use the Number of items condition with the same steps as above. Item counts are whole numbers, so 1 to 2 and 3 to 5 can’t overlap. Our test carts cost $5.95 for 2 bottles, $8.95 for 3 and $11.95 for 6 and for 12.

WooCommerce shipping based on quantity in Table Rate Shipping Rules: 1 to 2 items $5.95, 3 to 5 items $8.95, 6 or more items $11.95

The catch: a count doesn’t know what’s in the box. The 18 lb chair alone is 1 item, so the item-count table shipped it for $5.95. If your products vary in weight, price by weight, or add a second condition such as “and weight up to 10 lb”. Also note that Plus per item multiplies by every item in the order, not only the items above the start of the range.

Different rates per country or region work the same way: add a Table rate rules method to each shipping zone with its own table. To hide a shipping method for certain products or addresses, rather than price it, see Conditional Shipping & Payment Rules. Our shipping rate plugins are listed together.

FAQ

Can WooCommerce calculate shipping by weight without a plugin?

Not by the cart’s total weight. Flat rate formulas only know the item count and the order cost, and shipping classes are set per product. Shipping classes work when every product ships alone. For weight tiers you need a table rate plugin, a carrier plugin with live rates, or custom code.

What happens to products with no weight?

They count as 0 lb, so a cart of unweighed products lands in your lightest tier. Before you switch to weight-based rates, export your products (Products > All Products, then the Export button) and fill in every empty weight, then import the file back (Products > All Products, the Import button, with Update existing products ticked).

How do I charge per pound or per kilogram?

Use a rule with a fixed price for the base and “Plus per weight” for the extra: for example $12.95 plus $1.00 for every 1 lb above 20. Leave the step empty to charge exact fractions ($0.50 for half a pound), or set a step to charge every started step in full.

Does the packaging weight count?

Only if you include it. WooCommerce adds up the product weights you entered. Add the packaging to each product’s weight, or add a small handling fee per order in the method settings.

What to do next

Write your rate card down first, with the exact limits and what happens above the last tier. If each product ships in its own box, try shipping classes. If you price the whole box by weight, set up the table in Table Rate Shipping Rules, tick “Stop checking rules after this one” on every tier, and test a few carts on and around each limit (5 lb and 20 lb here) before you go live. The product page has a live demo with the plugin already set up, and the plugin comes with a 14-day money-back guarantee.

14-day money-back guarantee

Try it on your store, risk-free

Every plugin includes ongoing updates and support. If it isn’t right for your store, get a full refund within 14 days, no questions asked.