Inventory and stock

How to work out the value of your WooCommerce inventory

WooCommerce doesn't calculate inventory value. To work it out, export your products from Products › All Products › Export, which gives each product's and variation's Stock quantity, then multiply each quantity by its unit cost and add the results up. Use cost for your accounts, or Regular price if you want retail value instead.

Below: cost value vs retail value, the export method step by step, where product costs can live in WooCommerce, the traps (variations, negative stock, products without stock management), and a SQL version.

Cost value vs retail value

Method Formula Use it for
At cost Stock × unit cost Your accounts, cash tied up in stock, judging dead stock
At retail Stock × selling price Insurance, potential revenue if everything sold at full price

Cost value is the one most store owners need. It answers "how much money is sitting on my shelves?" Retail value is always higher, and the gap between the two is roughly your gross margin on that stock.

Your accountant may ask for a specific costing method (for example average cost or first in, first out). Those need purchase history that WooCommerce doesn't hold, so this guide uses a simple current unit cost. Check with them before you use the figure in your accounts.

The free way: export and multiply

  1. Go to Products › All Products and click Export.
  2. Keep Export all columns, leave product types and categories at their defaults, and click Generate CSV.
  3. Open the file in a spreadsheet. Keep ID, Type, SKU, Name, Parent, Stock and Regular price.
  4. Remove rows that would double count. If a variable product manages stock on each variation, delete the parent row (Type is variable) and keep the variation rows. If it manages stock at the parent level, keep the parent and ignore the variations' empty stock.
  5. Add a unit cost column. Fill it from your supplier invoices, or from wherever you keep costs (see the next section).
  6. Add a value column: stock × unit cost. Sum it.

For retail value, use Regular price in step 6 instead of cost. Use regular price rather than sale price so the figure doesn't swing every time you run a promotion.

A worked example

Product Stock Unit cost Value at cost Regular price Value at retail
Ceramic mug (white) 84 $6.50 $546 $22 $1,848
Linen apron (sage) 40 $14.00 $560 $48 $1,920
Wall print A3 30 $9.00 $270 $35 $1,050
Total $1,376 $4,818

The store has $1,376 of cash tied up in these three lines, which would bring in $4,818 if every unit sold at full price.

Where product costs live in WooCommerce

There's no cost column in a standard export, so you need costs from somewhere:

  • WooCommerce's Cost of Goods Sold feature. WooCommerce 10.3 (October 2025) added a cost field to products. It's off by default; turn it on under WooCommerce › Settings › Advanced › Features. Costs aren't added to orders placed before you turned it on.
  • A cost-of-goods plugin, if you've used one for a while.
  • A spreadsheet keyed by SKU, kept up to date from supplier invoices. For small catalogs this is often the simplest.

If you export with Yes, export all custom meta ticked, extra product data from WooCommerce and plugins comes out in columns starting meta:. Whether your costs appear there depends on how they're stored, so check the file. The guide on adding cost of goods to WooCommerce covers the options, and cost of goods sold explains the term.

Traps that throw the total off

  • Products without stock management have no quantity, so they add nothing to the total. If you hold stock of them, turn on stock management and count them.
  • Negative stock. Products that allow backorders can go below zero. Treat negative stock as zero when valuing, and note those orders separately.
  • Variations counted twice, once on the parent and once per variation. See step 4 above, and how to track stock for variations for how WooCommerce stores variation stock.
  • Stale stock counts. The value is only as good as the quantities. If you haven't counted the shelves in a while, do a stock take first.
  • Old costs. If a supplier raised prices, your unit cost should reflect what you'd pay now, or what you paid for the stock on hand, depending on your accountant's method.

For developers: inventory value in SQL

Current stock and prices are in wc_product_meta_lookup, with one row per product and per variation. This calculates retail value at current price (it includes sale prices, because max_price holds the active price):

SELECT ROUND(SUM(m.stock_quantity * m.max_price), 2) AS retail_value,
       SUM(m.stock_quantity) AS units
FROM wp_wc_product_meta_lookup m
JOIN wp_posts p ON p.ID = m.product_id
WHERE m.stock_quantity > 0
  AND p.post_status = 'publish'
  AND p.post_type IN ('product', 'product_variation');

Change wp_ if your table prefix differs. If you manage stock on a variable product's parent, that row's max_price is the highest variation price, so its value will be overstated. For value at cost, you'd join wherever your cost is stored, which varies by setup.

What Askshelf can and can't tell you

Askshelf's dead stock lookup also reports the total value of the stock you hold, at cost and at selling price. The cost figure needs WooCommerce's Cost of Goods Sold feature turned on and a cost on each product; without it you get the selling-price value only. Askshelf also shows this in the free store snapshot at the top of Analytics › Askshelf and in the WordPress Dashboard widget.

Askshelfexample answer

How much is my stock worth?

The stock you hold is worth $41,200 at cost and $88,750 at selling price. $3,860 of the cost is in products that haven't sold in 60 days.Dead stock, no sales in 60 days, including total stock value
An example on a demo store. In your store, the numbers come from your own orders.

It only counts products and variations that manage stock, so items without stock management aren't in the total. It's a current figure, not a history, and it won't replace the numbers your accountant uses for your accounts. It can also tell you which products will run out within a number of days you choose (1 to 120), from current stock and recent sales. See the WooCommerce inventory forecasting guide for the full routine.

Common questions

Does WooCommerce show the total value of my stock?

No. WooCommerce tracks the quantity of each product, and Analytics › Stock lists current stock, but neither adds up what that stock is worth. You multiply quantity by cost or price yourself, usually in a spreadsheet.

Should I value inventory at cost or at retail price?

At cost for your accounts and for knowing how much cash is tied up. Retail value is useful for insurance and for seeing potential revenue, but it overstates what the stock cost you. Ask your accountant which method they need.

Where do I store product costs in WooCommerce?

WooCommerce 10.3 added a Cost of Goods Sold feature, off by default under WooCommerce › Settings › Advanced › Features, which adds a cost field to products. Before that, stores used a plugin or kept costs in a spreadsheet.

See how Askshelf handles this: Stock forecasting for WooCommerce