Merchgain – Gross Margin & Profit Reports for WooCommerce

By baltano

0+ active installationsVersion 0.2.8

A free WooCommerce profit report on the native Cost of Goods Sold field: gross margin and gross profit per product, category and period.

Description

WooCommerce tells you what you sold. It does not tell you what you earned.

Merchgain adds a profit report to your admin: revenue, cost of goods, gross profit, and margin for
any period, per product and per category. Sort by margin, lowest first, and the products you sell
at a loss come to the top. Products that still have no cost are listed by name, with links
straight to them.

Only starting to enter costs? Orders placed before then have no cost recorded, so Merchgain
estimates them from today’s product costs. The estimate has a panel and columns of its own and is
never added to the recorded figures. Enter your costs today and see an estimate for last year
straight away.

It only reads. No product, price, order, or cost value is ever written back to your store, and
nothing leaves your server.

See it before you install. Live Preview
opens a demo store in your browser, with a year of orders, a product sold at a loss, and products
with no cost.

Requirements

  • WooCommerce 10.3 or newer.
  • Cost of Goods Sold switched on in WooCommerce > Settings > Advanced > Features. Until it
    is, the report screen shows you the steps.
  • A cost on your products, in the Cost of goods field of the General tab of the product editor.
    You do not need every product at once: start with the ones that sell, and the report shows how
    much of your revenue has a cost.
  • Costs kept only by another cost plugin are not used. The missing cost warning counts them and
    names the plugin, and the FAQ explains how to move them into WooCommerce.

What you get

  • Gross profit for any period—with revenue, cost of goods, and margin beside it, and a bar that
    splits revenue into cost, profit, and the part with no cost recorded.
  • Profit per product—sortable and searchable, with a bar beside every margin.
  • Profit per category—the same sales grouped by product category. A product that sits in
    several categories counts in each of them, and the screen says so.
  • Missing cost warning—how many products have no cost recorded, with links straight to the
    products, and how much of your revenue that leaves uncovered. If another plugin keeps the cost,
    the warning says so and names it, so an empty report stops being a mystery.
  • Estimate for older orders—items sold before their cost was recorded are estimated from
    today’s product costs, in a panel and columns of their own, marked as an estimate and never added
    to the recorded figures.
  • CSV export—the current view, exactly as you see it on screen. Very large reports are capped
    at 20,000 rows, and the file says so on its last line.
  • Foreign currency warning—orders in a currency other than your store currency are named and
    left out, instead of being quietly added into one wrong total.
  • Answers for AI assistants—on WordPress 6.9 or later, three read-only abilities: profit
    summary for a period, products sold at a loss, and products without a cost. An AI assistant you
    connect to your store yourself, for example through an MCP plugin, gets the same numbers as the
    screen.

What makes it different

  • CSV export in the free version. Not behind an upgrade.
  • The missing cost warning is a feature, not an upsell. You see coverage next to every
    number, so you always know how much of the report rests on real data.
  • Works without WooCommerce Analytics. Merchgain runs its own queries against the order
    tables, so it does not require the Analytics module to be enabled.
  • Nothing leaves your server. No account, no external service, no telemetry, no calls home.
    The report is calculated on your hosting and stays there. An AI assistant sees the figures only
    if you connect one to your store yourself.

How the numbers are calculated

Since WooCommerce 10.3 the cost of goods sold lives in the core product editor, and every order
records the cost at the moment of sale. WooCommerce Analytics does not report on it. Merchgain
reads that field and answers the question the sales report cannot: how much of this revenue is
actually yours. It is a WooCommerce profit report built on data your store already has—no
import, no second place to keep costs.

This is a cost of goods sold report, so profit and margin rest on the cost recorded at the moment
of sale, not on a current price list. The one exception is the estimate for items sold without a
recorded cost: it uses today’s product cost, says so wherever it appears, and is never added to the
recorded figures.

Revenue is the net line total of sold items after discounts, excluding tax and shipping. Refunds
count as negative amounts in the period they were issued, not in the period of the original sale.
Orders counted by default: completed, processing, and refunded.

Margin is profit divided by revenue, not markup on cost. A product bought for 60 and sold for
100 has a 40% margin here. That single distinction is what separates a profit margin report from
a sales report.

Profit and margin are calculated only on items whose cost is known. An item with no cost recorded
still counts towards revenue, but it is never treated as if it had cost zero. The report says so
instead of quietly inflating your margin.

More on merchgain.com

From the makers of Merchlint, a free catalog audit for
WooCommerce.

Installation

  1. Install and activate the plugin. WooCommerce 10.3 or newer is required.
  2. Go to WooCommerce > Settings > Advanced > Features and switch on Cost of Goods Sold.
  3. Fill in the cost on your products: the Cost of goods field in the General tab of the
    product editor.
  4. Open Profit & margin in the admin menu. It has its own item, just below the WooCommerce
    block.

New orders record the product cost at the moment of sale. Orders placed before your costs were in
place have none recorded, so the report estimates them from today’s product costs, separately
from the recorded figures.

FAQ

Do I have to enter a cost for every product first?

No. Start with the products that sell the most. Profit and margin are calculated on whatever has a
cost, and the report always says how much of your revenue that covers, so a partly filled catalog
gives you real numbers, not wrong ones. The missing cost warning links straight to the products
that still need one.

WooCommerce has no bulk editor for the cost field, but the REST API and WP-CLI can set the cost of
many products at once, for example from a spreadsheet.

Longer answer

What about orders placed before I filled in the costs?

They have no cost recorded, and Merchgain reports them as “no cost data” rather than as a cost of
zero. Their revenue still counts; they are left out of profit and margin, and the coverage line
tells you how much of your revenue that is.

Once their products have a cost, the report also estimates them: today’s product cost times the
quantity sold, the same way WooCommerce would record it if the sale happened today. The estimate
has a panel and columns of its own, every estimated figure is marked, and it is never added to the
recorded profit. If a cost price changed since the sale, the estimate is off by exactly that
change, which is why it stays apart.

Longer answer

How do I check whether a sale or Black Friday made money?

Open the report for the days of the sale: choose Custom range in the date selector, set the
first and last day, and click Apply. Gross profit at the top is what the sale earned on
items with a recorded cost. Sort the table by Profit, lowest first, to see the products sold
below cost.

The dates are part of the report address, written as year-month-day, so you can bookmark it or
edit it by hand: /wp-admin/admin.php?page=merchgain&range=custom&from=2026-11-27&to=2026-11-30.
A date written any other way opens the last 30 days instead.

Merchgain does not compare two periods for you. Open a second report for a period of the same
length just before the sale, on the same days of the week (here from=2026-11-20&to=2026-11-23),
and compare the two.

Enter your costs before the sale starts. WooCommerce records the cost on each order at the moment
of sale. An item sold before its product had a cost has none recorded, so the report can only
estimate it from today’s cost, in a panel of its own. If you fill in your costs just before the
sale, the period before it rests almost entirely on that estimate.

Refunds count in the period they were issued, so items returned after the sale show up as negative
amounts in the weeks that follow, not in the report for the sale days.

Longer answer

I keep my costs in another plugin. Why does Merchgain show them as missing?

Because those costs live in that plugin’s own storage—a field of its own or, for ATUM, a table
of its own—not in the WooCommerce core field. Merchgain tells you so instead of leaving you
guessing: the missing cost warning counts how many of those products have a cost kept by another
plugin and names it. Recognized: Cost of Goods: Product Cost & Profit Calculator for WooCommerce,
WooCommerce Cost of Goods, ATUM Inventory Management for WooCommerce, Booster for WooCommerce,
BjornTech PayPal POS integration for WooCommerce, Ni Cost of Goods for WooCommerce, and Cost Of
Goods For WooCommerce.

It counts them; it never uses them. A number taken from a field nobody can check is worse than a
gap, and a shop with two cost plugins in its history has two fields that disagree, neither of
them dated. Moving the values into the WooCommerce field is the durable answer, and the page
below shows how.

Longer answer

Is this net profit?

No, it is gross profit: revenue minus the cost of goods sold. Shipping, payment fees, advertising,
and other running costs are not deducted, because WooCommerce does not record them as a cost of
the order in any standard form. Tax and shipping are left out of revenue as well.

Longer answer

How is margin calculated?

Profit divided by revenue. A product bought for 60 and sold for 100 gives 40 profit and a 40%
margin. This is not markup on cost, which for the same product would be 66.7%. The two get mixed
up often, so the definition is printed under the report as well.

Longer answer

Where do the costs come from?

From the Cost of Goods Sold field built into WooCommerce 10.3 and newer. Merchgain does not store
costs of its own and does not add a second cost field to your products.

Longer answer

Why doesn’t WooCommerce Analytics show my profit?

Because Analytics does not read the cost field at all. WooCommerce records the cost on every
order, but none of the Analytics reports uses it, and the WooCommerce documentation says the
feature does not integrate with Analytics for now. Merchgain reads the cost from the orders
directly, so it works whether Analytics is switched on or off.

Longer answer

Does any data leave my server?

No. Merchgain makes no outgoing connections at all: no analytics, no license check, no update
ping of its own. Everything is calculated by your own database and displayed in your own admin.
The one exception is your own choice: an AI assistant you connect to your store can read the
report through Merchgain’s abilities, as the next question explains.

Longer answer

Can an AI assistant read my reports?

Only if you connect one yourself. On WordPress 6.9 or later, Merchgain registers read-only
abilities through the WordPress Abilities API: a profit summary for a period, the products sold
at a loss, and the products without a cost. An AI assistant you connect to your store, for example
through an MCP plugin, can call them as a logged-in user with the “view WooCommerce reports”
permission, and gets the same figures as the Profit & margin screen. Merchgain itself sends
nothing anywhere and changes nothing in your store.

Longer answer

Does it slow my store down?

The report runs in the admin only, never on the storefront, and results are cached for an hour.
Entering a cost in the product editor clears that cache immediately, so the numbers never wait for
a timer. For anything else that changes the figures, such as an order status, a refund issued
elsewhere, or an import, there is a Recalculate button at the top of the report.

Longer answer

Does it work with High-Performance Order Storage?

Yes, and with the classic post-based storage as well. Cost values live in the order items table,
which is the same in both layouts.

Longer answer

Who can see the report?

Anyone with the “view WooCommerce reports” capability, which is the same permission WooCommerce
uses for its own sales reports. A shop manager has it, and so does a bookkeeper account limited to
reports only. The report has its own item in the admin menu, Profit & margin, sitting just
below the WooCommerce block. It is not inside the WooCommerce submenu, where an account limited to
reports would never see it: that submenu needs a permission such an account does not have.

Longer answer

How much history does the report cover?

All of it. There is no date limit. Any range can be selected, including a single month from
years back; profit and margin appear wherever a cost was recorded on the sold item.

Longer answer

Which orders are counted?

Completed, processing, and refunded. Refunded is in the list on purpose: a full refund flips the
parent order to that status, and leaving it out would make a fully refunded order count as minus
its own value instead of zero. WooCommerce Analytics excludes only pending, failed, and cancelled
by default, so this set is one status narrower: it skips on-hold.

Longer answer

Which month does a refund belong to?

The month the refund was issued, not the month of the original sale. A September sale refunded in
November leaves September untouched and shows as a negative amount in November. Reports of closed
months do not change behind your back.

Longer answer

I issued a refund and my historical profit changed. Why?

That is WooCommerce, not Merchgain. Creating a refund makes the core recalculate the cost of every
item on the parent order using the product’s cost as it is today. If the product cost changed in
the meantime, the stored history changes with it. Merchgain reports what is in the database; it
does not silently keep a second copy.

Longer answer

My product genuinely costs zero and it shows up as missing a cost. Why?

Because WooCommerce cannot tell the two apart. Saving a cost of zero, on the product or on an
order item, makes the core store nothing at all rather than a zero, so “cost of zero” and “no
cost entered” end up identical in the database. Rather than guess, Merchgain always says “no cost
data” and never “cost 0”. Free samples, giveaways, and downloadable extras will therefore appear on
the missing cost list.

Longer answer

I have orders in euros and dollars. What happens to them?

They are left out of the report and named in a warning above the numbers. Merchgain does not
convert exchange rates, and adding several currencies into one total would produce a number that
looks right and is not.

Longer answer

My category totals add up to more than the summary card. Why?

Because a product that sits in several categories is counted in each of them. A mug in both
“Kitchen” and “Gifts” adds its sales to both rows, so the rows add up to more than the store
actually sold. The alternative, picking one category and dropping the sale from the other,
would quietly understate every shared category, which is worse. The summary cards are counted
from the order items themselves, so they are never double counted. The screen says this under
the table, and a CSV export of the category view says it on the last line, with both numbers.

Longer answer

Screenshots

Changelog

0.2.8

  • The description on wordpress.org is rewritten: requirements first, a link to Live Preview,
    clickable links to longer answers on merchgain.com, and four new questions in the FAQ, one of
    them on checking whether a sale or Black Friday made money.
  • Release notes up to 0.2.4 moved to changelog.txt in the plugin folder. The report itself is
    unchanged.

0.2.7

  • New: under the report, a short note about Merchlint, a free catalog audit from the same author.
    It appears only on the report screen, only if Merchlint is not installed, and “Don’t show again”
    hides it for good.

0.2.6

  • New: abilities for AI assistants. On WordPress 6.9 or later Merchgain registers three read-only
    abilities through the WordPress Abilities API – a profit summary for a period, the products sold
    at a loss and the products without a cost – so an AI assistant connected to your store through
    MCP answers with the same figures as the report screen.
  • They need the same “view WooCommerce reports” permission as the screen and never change
    anything. Merchgain still makes no outgoing connections: the figures reach an assistant only
    over a connection you set up yourself.
  • A product counts as sold at a loss when its recorded cost was higher than its revenue in the
    period. Refunds of earlier sales are not a loss, and items without a recorded cost are not
    judged – the list of products without a cost covers those.

0.2.5

  • New: an estimate for items sold without a recorded cost. WooCommerce records the cost on the
    order at the moment of sale, so a shop that enters its costs today has none on last year’s
    orders. The report now estimates those items from each product’s cost as it is today – the
    same rule WooCommerce uses when it records a cost, variations included – and shows the result
    in a panel of its own under the summary cards.
  • The estimate is never added to the recorded figures. The summary cards, the Cost, Profit and
    Margin columns and the coverage line are calculated exactly as before; the estimate has its own
    cards, its own “Estimated profit” and “Estimated margin” columns, which can be sorted, and an
    approximately-equal sign on every estimated figure on screen.
  • The CSV export has five new columns at the end – revenue, cost, profit, margin and item count of
    the estimate – and explains them in a note at the end of the file. Existing columns keep their
    places.
  • Items with no cost even today – a product with no cost or a cost of zero, or one deleted since
    the sale – are not estimated; when the panel is shown, it says how much revenue that leaves out.
  • Nothing is written to the store: the estimate is calculated when the report is opened.
  • The one-time review request can now also appear below a report that has only an estimate.
  • New look: gross profit is the largest number on the screen, with revenue, cost of goods and
    margin beside it in a summary panel, and a bar shows how revenue splits into cost, profit and
    the part with no cost recorded. Margins in the table have a bar beside them, the search box and
    the CSV button sit next to the table they work on, and the screen uses the colours of the
    Merchgain icon. The numbers and how they are calculated are unchanged.
  • Fixed: the link next to the coverage line always said 74%, whatever the real share was; it now
    quotes the line. A share just under 100% or just over 0% shows one decimal, such as 99.6%,
    instead of being rounded to 100% or 0%.
  • Fixed: switching from a product search to the category view kept the search phrase, so the
    screen said the search filtered a table it did not filter, and the category export lost its
    note about products counted in several categories.
  • Fixed: an account that can see reports but not edit products got the names in the missing cost
    list as empty links that reloaded the report. They are plain names now.

Older releases: changelog.txt in the plugin folder.