Home Docs How It Works How MarginOS calculates Gross Profit (CM1)

How MarginOS calculates Gross Profit (CM1)

Last updated: August 5, 2026 By Aron Baczoni

Quick Reference

Inputs

Connected Shopify store (orders, refunds, shipping revenue); per-SKU landed unit costs (exact, override, or store-wide default); fulfillment costs from a 3PL, shipping provider or your pick-pack default; payment gateway fee rates.

Outputs

Gross Profit (CM1) in dollars per order, SKU, channel and window; Gross Margin %; the cost stack that produced it (COGS, fulfillment, payment fees, refund fees).

Outcomes

Know which products, channels and orders actually make money before you spend on marketing — and see exactly which cost is eating the margin.

MarginOS SKU detail drawer showing the Gross Profit cost stack: net revenue less COGS, fulfillment and payment fees
Every variable cost MarginOS subtracts to reach Gross Profit (CM1), itemised for a single SKU.

MarginOS calculates Gross Profit — also called Contribution Margin 1, or CM1 — as your net revenue plus the shipping your customer paid, minus every variable cost of delivering that order: COGS, fulfillment, payment gateway fees and refund fees. It is computed on each individual order and then rolled up to the SKU, channel and window you are looking at, so every screen in MarginOS shows the same number. CM1 is your profit before marketing spend, which is what makes it the honest starting point for every other metric in the product.

What is Contribution Margin 1 (CM1)?

Contribution Margin 1 (CM1) is net revenue plus shipping revenue, minus all variable delivery costs for an order — COGS, fulfillment, payment fees and refund fees — before any marketing spend or fixed overhead. In MarginOS, CM1 and Gross Profit are the same number; the product uses the terms interchangeably and computes them with one shared formula.

CM1 is for operators who need to know whether a product, channel or order actually makes money once the real cost of getting it to the customer is counted. It matters because top-line revenue and even textbook “gross margin” routinely hide the costs that decide DTC profitability: pick and pack, the 3PL invoice, the processor’s cut, and the fees you never get back on a refund. MarginOS deliberately excludes advertising from CM1 so that product profitability and acquisition cost stay separate, measurable things.

Before you start

  • A connected Shopify store — the source of orders, refunds, financial status and shipping revenue.
  • A unit cost for the SKUs you sell, from any tier: an exact per-unit landed cost, a manual override, or a store-wide default.
  • A fulfillment cost source — a connected 3PL or shipping provider, or your store-wide pick-pack default.
  • Payment gateway fee rates for the processors you use, so the processor’s cut is deducted rather than estimated.

Where to see Gross Profit in MarginOS

  1. Open Command Center to see contribution profit and Gross Margin % for your store over the selected date window.
  2. Open Catalog Profit to see Gross Profit per SKU in the SKU Economics table.
  3. Click any SKU to open its detail drawer, where the full cost stack behind that CM1 is broken out line by line.
  4. Open Growth to compare CM1 by acquisition channel, which is the basis for LTGP and LTGP:CAC.

Inputs and settings reference

Term What it is Where it comes from Effect on CM1
Net revenue Order subtotal minus refunded subtotal Shopify order and refund line items Adds
Shipping revenue Delivery charges the customer actually paid Shopify shipping lines Adds
Net COGS Gross COGS minus COGS credited back for restocked returns Effective landed unit cost × units Subtracts
Effective landed unit cost Base product cost plus freight, inbound handling and storage Cost tiers: exact cost, manual override, or store-wide default Sets the size of COGS
Fulfillment cost Pick, pack and ship cost for the units on the order 3PL or shipping provider invoice, or store-wide default Subtracts (never reversed on a refund)
Payment gateway fees The processor’s cut of the order, net of the portion reclassified to refund fees Per-gateway rates in Settings Subtracts
Refund fees The processing fee you keep paying on the refunded portion of an order Derived from the resolved payment fee and the refunded share Subtracts

Only orders that are not cancelled, not test orders, and whose financial status is paid, partially_paid, partially_refunded or refunded are included. Cancelled and voided orders are excluded entirely.

How MarginOS calculates Gross Profit (CM1)

MarginOS computes CM1 on each order and sums the result — it never applies an average margin to a revenue total. The canonical formula is:

CM1 = (net revenue + shipping revenue) − net COGS − fulfillment costs − payment gateway fees − refund fees

Where net revenue = order subtotal − refunded subtotal and net COGS = gross COGS − refunded COGS. Gross Margin % is then CM1 ÷ net revenue × 100.

Three details decide whether that number is honest, and MarginOS handles each explicitly:

  • COGS is only reversed when the product comes back. A refund credits COGS back only for units that are restocked to sellable inventory. When a refund is marked no-restock, the revenue is reversed but the product cost stays expensed — you refunded the cash and never got the item back, so the loss is larger, and MarginOS shows it that way instead of assuming full recovery.
  • Fulfillment is never reversed. Pick, pack and shipping were spent the moment the order went out. A refund does not give that money back, so fulfillment cost stays in the calculation.
  • Refund fees are a reclassification, not an extra charge. When an order is refunded, the processing fee you already paid on the refunded share is moved out of the payment-fee term and shown as a refund fee. Payment fees plus refund fees still equal the total fee the processor took, so CM1 is unchanged — the decomposition simply becomes truthful about why the money is gone.

Because CM1 requires a cost for every unit sold, MarginOS resolves unit cost through a tiered hierarchy — an exact per-unit landed cost first, then a manual override, then a store-wide default. When it has to fall back to a store-wide assumption it raises a data-quality signal and marks the SKU’s trust level rather than presenting an assumption as a measurement. MarginOS never invents a cost to make a margin look complete.

What MarginOS calls this on each screen

One number, three labels. MarginOS names Gross Profit for the decision each screen supports, which means you will meet the same figure under different headings as you move around the product. They are not different metrics and there is no reconciliation to do between them.

Where you are What it is called Why that name there
Command Center, Performance Snapshot Contribution Profit The snapshot is a period summary, so the label names what the period contributed.
Growth, Campaigns, and the profit matrix drawer Profit before ads These screens sit next to ad spend, so the label makes explicit that marketing has not been subtracted yet.
Product detail drawer and the Business Lines panel Gross Profit (CM1) Per-unit and per-business-line views use the accounting name, since that is the frame you are reading them in.

If two of these ever disagree for the same period and business line, that is a bug worth reporting — not a difference in method.

Example

An order for 3 units of a SKU that sells for $40.00 and has an effective landed unit cost of $18.00. The customer paid $9.95 shipping, then returned 1 unit, which was restocked. Fulfillment is $4.50 per unit, and the processor charged $4.07 on the order.

Term Calculation Amount
Net revenue $120.00 subtotal − $40.00 refunded $80.00
Shipping revenue charged to the customer +$9.95
Net COGS $54.00 gross − $18.00 credited for the restocked unit −$36.00
Fulfillment 3 units × $4.50, not reversed by the return −$13.50
Payment fees $4.07 total fee − $1.25 reclassified to refund fees −$2.82
Refund fees the kept fee on the refunded 30.8% of the order −$1.25
Gross Profit (CM1) $36.38

Gross Margin % is $36.38 ÷ $80.00 × 100 = 45.5%. Note that payment fees and refund fees still sum to the $4.07 the processor actually took. If that same return had been marked no-restock, the $18.00 COGS credit would disappear and CM1 would fall to $18.38 — the same refund, roughly half the profit, which is exactly the difference operators need to see.

FAQ

Is CM1 the same as Gross Profit in MarginOS?

Yes. MarginOS treats Contribution Margin 1 and Gross Profit as the same number: profit after all variable delivery costs and before marketing spend. Every screen uses the one canonical formula.

Why does MarginOS call this three different things?

Because each screen names the number for the decision it supports: “Contribution Profit” on the Command Center summary, “Profit before ads” wherever the figure sits beside ad spend, and “Gross Profit (CM1)” in per-unit and per-business-line views. All three are the same canonical formula on the same orders, so they never need reconciling against each other.

Does MarginOS include shipping revenue in Gross Profit?

Yes. The shipping the customer paid is added to revenue, and fulfillment cost is subtracted, so CM1 shows whether delivery paid for itself. Shipping revenue stays a separate visible term, never folded into net revenue.

Does MarginOS subtract advertising spend from Gross Profit?

No. CM1 is profit before marketing. Advertising is applied later in CAC, LTGP:CAC and payback, so you can see product profitability separately from acquisition cost.

What happens to COGS when a customer returns an item?

MarginOS reverses COGS only when the unit is restocked to sellable inventory. If the refund is marked no-restock, the revenue is reversed but the product cost stays expensed, because the merchant refunded the cash and never got the product back.

Which orders count toward Gross Profit?

Orders that are not cancelled, not test orders, and whose financial status is paid, partially paid, partially refunded or refunded. Cancelled, voided and test orders are excluded entirely.

Why is my Gross Profit missing or marked low trust?

CM1 needs a cost for every unit sold. When a SKU has no exact unit cost, MarginOS falls back to an override or a store-wide default and flags it with a data-quality signal rather than inventing a number.

Related

About the author

Aron Baczoni

Aron Baczoni is the founder of MarginOS and a former decade-long veteran of Google's Ads and Global Business Operations units. His work is focused on bridging the gap between AI's promise and its practical implementation for direct-to-consumer (DTC) brands, helping them build a sustainable competitive advantage through strategic, high-ROI AI solutions.

Read Aron's story

Get Your Profit & Inventory Command Center

See your real margins in real time, not in spreadsheets.

Get your Profit & Inventory Command Center

Or email sales@marginos.com to see your real margins on your own data.