The Cost of Goods Sold (COGS) feature lets you record the cost of buying or making products in your WooCommerce store. You can set costs for Simple and Variable products, and view costs on orders.
What is Cost of Goods Sold (COGS)?
↑ Back to topCost of Goods Sold is the direct cost of producing or purchasing the products a business sells. The costs you record can help you assess product and order profitability. They do not, by themselves, account for every business expense.
Activate the COGS feature
↑ Back to topTo activate COGS for your store, follow the steps below:
- Navigate to WooCommerce > Settings > Advanced > Features.
- Scroll down to the Cost of Goods Sold option and check the box.
- Click Save changes.

Setting COGS for products
↑ Back to topOnce the COGS feature is activated, you can set the cost for individual products and variations.
COGS for Simple products
↑ Back to topFor Simple products, follow the steps below:
- Go to Products > All Products and edit the product whose COGS you want to set.
- Scroll to the Product data meta box and click the General tab.
- In the Cost of goods field, set the cost value for the product (this defaults to zero if not set).

COGS for Variable products
↑ Back to topFor Variable products, the Cost of goods field in the General tab will display a default value inherited by all variations.

You can override the default value for each variation by entering a cost in the field for individual variations, as shown below:

A bulk action is available to remove custom costs from all variations, reverting them to the default cost.
COGS in orders
↑ Back to topCOGS details are also present for individual orders listed at WooCommerce > Orders.
First, click an order to view its details. In the order details section, a Cost column will display the cost of each item in that order (e.g. the individual product cost multiplied by the quantity of the line item).
Additionally, the Cost Total will be shown below to the total order amount.

For orders containing refunds, the Cost column will display the combined cost of the refunded items. Additionally, a tooltip is also available to show the cost per unit of each product.
Frequently asked questions
↑ Back to topWhat happens if I use another COGS plugin alongside WooCommerce’s COGS feature?
↑ Back to topIf you activate WooCommerce COGS and install a third-party COGS plugin, you may see separate cost fields or totals. Check the third-party plugin’s documentation and decide which source to use for your records.
Does analytics include COGS data?
↑ Back to topCurrently, the COGS feature does not integrate with WooCommerce Analytics.
Does changing a product’s price update COGS on existing orders?
↑ Back to topNo, changing a product’s price does not automatically change the recorded cost on existing orders.
Does COGS support import/export?
↑ Back to topYes, WooCommerce’s core product CSV import/export tool supports the COGS field. You can export COGS values and create a CSV file to import these values back into your store.
Questions and support
↑ Back to topDo you still have questions and need assistance?
This documentation is about the free, core WooCommerce plugin, for which support is provided in our community forums on WordPress.org. By searching this forum, you’ll often find that your question has been asked and answered before.
If you haven’t created a WordPress.org account to use the forums, here’s how.
- If you’re looking to extend the core functionality shown here, we recommend reviewing available extensions in the WooCommerce Marketplace.
- Need ongoing advanced support or a customization built for WooCommerce? Hire a Woo Agency Partner.
- Are you a developer building your own WooCommerce integration or extension? Check our Developer Resources.
If you weren’t able to find the information you need, please use the feedback thumbs below to let us know.