Shopify Profit, Gross Margin, and COGS Analytics

Works with Analytics Spreadsheet Updated October 8, 2026
On this page

Gross Profit is sales minus the cost of the goods sold, % Gross Margin is that profit as a share of sales, and Amount of Cost of Goods Sold is the current variant cost multiplied by the quantity sold.

Revenue tells you what sold. Shopify profitability analytics adds the current product cost so you can compare Amount of Cost of Goods Sold, Gross Profit, % Gross Margin, and Orders Net Profit across your product variants.

These metrics are useful for merchandising and pricing, but they are not a complete business-profit calculation.

How Shopify profit, margin, and COGS are calculated

Amount of Cost of Goods Sold = Current variant cost × Quantity sold

Gross Profit = Sales - Amount of Cost of Goods Sold

% Gross Margin = Gross Profit ÷ Sales × 100

All three depend on Shopify’s Cost per item. Shopify does not keep the historical cost from the moment an order was placed, so Mixtable uses each variant’s current cost. That makes these estimates for merchandising and pricing rather than accounting figures, and variants with no cost set cannot contribute normally.

Why your bestseller list can be misleading

Sales rankings reward whatever moves the most money. That is not the same as whatever makes you the most money, and the two lists are often surprisingly different.

A discounted hero product can gross more than anything else in your catalog and contribute less than a quiet mid-table product with double the margin. Until you put cost beside sales, there is no way to tell them apart, so stock, ad spend, and homepage space keep flowing to whatever looks biggest.

Adding profitability metrics lets you:

  • Rank products and variants by what they contribute, not by what they gross
  • Decide which products deserve advertising budget and prime placement
  • Spot items selling well at a margin too thin to be worth the handling
  • Check whether a promotion left anything behind after the discount
  • Compare variants from different vendors on margin rather than revenue

Margin and profit answer different questions, so read them together. A 70% margin on something that sells twice a month matters less than a 25% margin on something that sells daily.

Before using profitability metrics

Shopify does not provide Mixtable with the historical Cost per item from the moment each order was placed. Mixtable uses the current cost stored on the product variant.

This means:

  • Changing Cost per item can change the profitability interpretation of historical sales
  • Variants without a cost cannot contribute normally to cost-based calculations
  • The report does not preserve earlier supplier costs by order date
  • The result is a current-cost estimate, not audited accounting profit

Complete and review your Shopify variant costs before relying on the ranking.

To see how a variant’s cost changed, and when, right-click its Cost Per Item cell in a Products (with variants) worksheet and choose View cell history. Mixtable records every variant’s cost, so you can tell which costs moved recently before you read the margins. See Shopify product price history.

Profitability metrics

Cost of Goods Sold

Listed in the metric menu as Amount of Cost of Goods Sold. It multiplies the variant’s current Cost Per Item by the relevant sold quantity, estimating what the merchandise cost you.

Gross Profit

Subtracts current variant cost from the supported line-item sales basis for the relevant quantity. This is the money left after paying for the goods, before any of your other costs.

Gross Margin

Listed in the metric menu as % Gross Margin. It expresses Gross Profit as a percentage of the corresponding sales basis, which is what lets you compare a $12 product with a $400 one on equal terms.

Orders Net Profit

Calculates line-item net unit price minus current variant cost, multiplied by current quantity. It is available as an analytics column on Product Variant worksheets.

Customer Lifetime Value

Available as an analytics column on Customers worksheets. It subtracts the estimated cost of everything a customer bought from their Net Sales excluding tax, so it reports profit per customer rather than revenue. Because it depends on cost, it shows N/A for any customer who bought a variant with no cost recorded.

See Shopify Customer Analytics.

Start with Variant margin & inventory

The ready-made Variant margin & inventory report creates a Product Variants worksheet with:

  • Product Title
  • SKU
  • Price
  • Cost Per Item
  • Total Inventory
  • Amount of Cost of Goods Sold
  • Gross Profit
  • % Gross Margin
  • Net Sales
  • Net Quantity Sold
  1. Click the + at the end of the worksheet tabs, or choose Worksheet > Add worksheet…
  2. Select Reporting worksheet, then click Continue
  3. Under Shopify data worksheet with analytics columns, select Variant margin & inventory, then click Continue
  4. Review the selected fields, analytics columns, and rows
  5. Click Create Worksheet

This is the best starting point because it keeps the current price, cost, and inventory beside the calculated metrics.

Add a profitability metric to a variant worksheet

  1. Open a Product Variants worksheet

  2. Click + Shopify data in the header row of an empty column, or choose Column > Add Shopify data… from the menu bar. The field picker opens

  3. Click Sales & analytics in the list of sections on the left, or type the metric's name in the search box

    The Sales & analytics section of the Mixtable field picker, listing metrics such as Net Sales and Gross Sales for a Shopify data worksheet

  4. Click Orders Net Profit, Gross Profit, % Gross Margin, or Amount of Cost of Goods Sold. The metric's settings open with it already chosen under Which metric?

  5. Under Over what time period?, choose All time, Fixed dates, Rolling period, Calendar year, or Calendar month

  6. Under Limit which orders count, add any optional filters supported by the metric

  7. Click Save Column

Use the same timeframe and filters across all profit, cost, sales, and quantity columns.

Use profit metrics in a Pivot Table worksheet

The Pivot Table worksheet builder lists Gross Profit, % Gross Margin, and Amount of Cost of Goods Sold under Profit, marked as needing cost-per-item data. Mixtable calculates these metrics per product variant, so the rows a breakdown creates, such as one row per vendor, product type, product category, product tag, Market, or customer segment, show N/A for them.

To see profit in a Pivot Table worksheet, add a row for a group of variants yourself:

  1. Right-click an empty row’s number and click Choose what to analyze… at the top of the menu, or choose Row > Choose what to analyze… from the menu bar
  2. In the Analytics Row Settings window, choose Product Variants under What do you want to analyze?
  3. Select Only matching product variants and add your conditions, such as a cost above a threshold
  4. Click Save Row

The worksheet’s profit columns then show values for that row.

To compare vendors, add a Vendor column beside the profit columns on a Products (with variants) worksheet (click + Shopify data, then click Vendor in the field picker’s Organization section and click Save Column), then sort or filter by it. If one vendor has complete costs and another does not, the comparison is not fair until the missing Shopify costs are filled.

Profit is not the same as Net Sales

Net Sales removes discounts and returns from merchandise sales. It does not subtract product cost. A high-Net-Sales variant can still produce weak margin when its cost is high.

Place these together:

  • Net Sales
  • Amount of Cost of Goods Sold
  • Gross Profit
  • % Gross Margin
  • Net Quantity Sold

This separates scale from efficiency.

What these metrics do not subtract

Mixtable’s variant profitability metrics do not represent complete operating profit. They do not subtract every possible cost, such as:

  • Advertising and agency spend
  • Payment processing fees
  • Warehousing and pick-and-pack cost
  • Shipping subsidies
  • Returns handling and customer support
  • Platform subscriptions
  • Payroll and overhead

Use the metrics for merchandise-level comparison. Add your own cost assumptions with formula columns when you need a broader contribution-margin model.

Improve the report with spreadsheet formulas

Useful additions include:

  • Gross Profit per unit
  • Recent profit versus all-time profit
  • Margin bands for sorting and filtering
  • A flag for blank or zero cost
  • A target-margin variance column

You don’t need a formula for inventory value. Products (with variants) worksheets offer it as inventory metrics: Closing Value at Cost and Closing Value at Retail value your stock on the date you choose, Units Without Cost counts stocked units that have no cost set, and Dead Stock Value at Cost shows the cost tied up in stock that did not sell during the period. See Shopify stock levels and inventory value analytics.

For the existing single-metric workflow, see Shopify Orders Net Profit Analytics.

Mixtable Analytics SpreadsheetNet Sales, orders, and margin calculated from your store's orders
Install on Shopify

↑↓to moveEnterto open