WooCommerce Cost of Goods Sold (COGS)

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 top

Cost 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 top

To activate COGS for your store, follow the steps below:

  1. Navigate to WooCommerce > Settings > Advanced > Features.
  2. Scroll down to the Cost of Goods Sold option and check the box.
  3. Click Save changes.

Setting COGS for products

↑ Back to top

Once the COGS feature is activated, you can set the cost for individual products and variations.

COGS for Simple products

↑ Back to top

For Simple products, follow the steps below:

  1. Go to Products > All Products and edit the product whose COGS you want to set.
  2. Scroll to the Product data meta box and click the General tab.
  3. 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 top

For 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 top

COGS 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 top

What happens if I use another COGS plugin alongside WooCommerce’s COGS feature?

↑ Back to top

If 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 top

Currently, the COGS feature does not integrate with WooCommerce Analytics.

Does changing a product’s price update COGS on existing orders?

↑ Back to top

No, changing a product’s price does not automatically change the recorded cost on existing orders.

Does COGS support import/export?

↑ Back to top

Yes, 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 top

Do 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.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.