Profit

How to add cost of goods to WooCommerce

To add cost of goods in WooCommerce 10.3 or later, go to WooCommerce › Settings › Advanced › Features, tick Cost of Goods Sold and save. Each product then has a Cost of goods field on its General tab, and variations can override it. On older versions, use a cost-of-goods plugin or keep costs in a spreadsheet.

Below: how the core feature works step by step, how to fill in costs for a whole catalog, what it shows on orders, what it doesn't do yet, and when a spreadsheet is still the better tool.

The free way: WooCommerce's built-in Cost of Goods Sold

WooCommerce moved Cost of Goods Sold into core in version 10.3, released in October 2025, after a beta period. What follows is based on the WooCommerce COGS documentation, as checked in November 2026.

Turn it on

  1. Make sure you're on WooCommerce 10.3 or later (Dashboard › Updates or Plugins).
  2. Go to WooCommerce › Settings › Advanced › Features.
  3. Tick Cost of Goods Sold and click Save changes.

Enter a cost for a simple product

  1. Open the product in Products › All Products.
  2. In the Product data box, on the General tab, find Cost of goods.
  3. Enter what one unit costs you, then Update the product.

The field starts at zero. Use what you actually pay per unit landed in your stockroom: the supplier price plus inbound freight and import duty if you can work them out per unit. Whatever you include, include it consistently.

Costs for variable products

For a variable product, the Cost of goods field on the parent's General tab is a default. Every variation uses it unless you give that variation its own cost. That suits a T-shirt where every size costs the same, and you only override the XXL that costs more.

To set a variation's cost, open the Variations tab, expand the variation and enter its cost. There's also a bulk action that removes the custom cost from all variations so they go back to the parent's default.

Fill in a whole catalog with CSV

Typing costs one product at a time is slow for a big catalog. WooCommerce's product CSV exporter and importer support the cost field:

  1. Go to Products › All Products and click Export. Export the products (and variations) you want.
  2. Open the CSV, fill in the cost column for each row, and save.
  3. Back in Products, click Import, choose the file, tick the option to update existing products, and map the cost column if it isn't matched automatically.

Test on a handful of products first. A mismatched column can overwrite the wrong field.

What you see after costs are entered

Once a product has a cost, new orders show it on the order edit screen (WooCommerce › Orders, then open an order):

Where What appears
Line items A Cost column with each item's cost (unit cost × quantity). The old cost column is now labeled Price.
Order totals A Cost Total next to the order total
Refunded items The combined cost of the refunded items, with the per-unit cost in a tooltip

The cost is saved on the order item when the order is placed. If your supplier raises prices next month and you update the product, past orders keep the cost they had. That's what you want: last spring's margin stays last spring's margin.

What core Cost of Goods doesn't do (yet)

This is where most store owners get caught out.

  • No Analytics reports. WooCommerce's documentation says the feature doesn't integrate with WooCommerce Analytics. There's no cost, gross profit or gross margin column in Analytics › Products, Revenue or anywhere else. To see margin, export and calculate (see gross margin by product).
  • No backfill. Costs are stored on orders as they're placed. Orders from before you turned the feature on, or before you entered a product's cost, have no cost recorded.
  • Recalculating an order can change its cost. WooCommerce's developers note that an order's cost is recalculated whenever its totals are recalculated. If you edit an old order and click Recalculate, expect it to pick up the product's current cost.
  • Simple and variable products. The documentation covers simple products and variations. If you sell bundles, composites or other product types from extensions, check how those extensions handle cost.
  • No historical cost method. It records the product's cost at the time of the order, not a first-in-first-out cost from stock batches.
  • Two systems clash. If you already run a cost-of-goods plugin, the documentation says you'll see two cost totals on orders and WooCommerce won't pick one for you. Choose one source and stick with it.

Plugins and spreadsheets: when they're still better

Use a plugin if you want profit reports inside WordPress today. Several third-party plugins (Cost of Goods for WooCommerce is one long-running example) add cost fields plus profit reports. Compare what each reports before choosing, and avoid running one alongside the core feature.

Use a spreadsheet if you mainly want a monthly profit number and margin by product. A sheet with SKU, product name and unit cost, matched against a CSV from Analytics › Products, gives you cost of goods sold for any period, including periods before you entered costs in WooCommerce. Add a "cost from" date column when supplier prices change, so older months use the cost you actually paid.

Many stores do both: costs in WooCommerce so every new order records its cost, and a spreadsheet for monthly reporting.

What Askshelf can and can't tell you

Askshelf reads the cost recorded on each order, so once the core Cost of Goods Sold feature is on and your products have costs, you can ask for profit in plain language. It returns net sales, cost of goods, gross profit and margin, in total and per product, for any date range, and it can compare with an earlier period.

It follows the same rule as WooCommerce: orders placed before you entered costs have no cost on them, so they have no profit figure. Askshelf also doesn't know shipping costs, payment processor fees, ad spend or packaging, so it reports gross profit, not net profit.

Askshelfexample answer

Which products had the best gross margin last month?

In October, your overall gross margin was 61% on $18,400 net sales. The stoneware mug had the highest margin at 72% ($1,570 gross profit), followed by the linen napkin set at 66%. The ceramic pour-over set earned the most gross profit ($1,490) at a 46% margin. Shipping and payment fees are not included.Profit, 1–31 October, per product
An example on a demo store. In your store, the numbers come from your own orders.

Askshelf can also add up the value of your stock on hand at cost (with Cost of Goods Sold on) and at selling price. It's free for 10 questions a month; see the profit reporting use case for how it fits a monthly routine.

What to do once costs are in

For the full picture of turning sales into profit, see the WooCommerce profit reporting guide.

Common questions

Does WooCommerce have a cost of goods field?

Yes, since WooCommerce 10.3 (October 2025). It's off by default. Turn it on under WooCommerce › Settings › Advanced › Features, and each product gets a Cost of goods field on its General tab.

Will old orders get costs when I turn on Cost of Goods Sold?

No. WooCommerce saves the cost on each order when the order is placed, so orders from before you entered costs have none. To include them in a profit calculation, apply your costs in a spreadsheet.

Can Askshelf show profit once costs are entered?

Yes. Askshelf reads the cost saved on each order and reports net sales, cost of goods, gross profit and margin, in total and per product. Orders placed before costs were entered have no profit figure, and shipping and payment fees aren't included.

Does WooCommerce Analytics show profit once costs are entered?

Not as of November 2026. WooCommerce's documentation says the Cost of Goods Sold feature doesn't integrate with Analytics, so costs appear on products and orders but not in reports.

See how Askshelf handles this: Profit reporting for WooCommerce