Ecommerce Profit Calculator: Gross Profit, Contribution, and Net Margin

UNIT ECONOMICS & FINANCE8 min read

Use the right profit layer for pricing, ads, and monthly reporting instead of treating gross margin, order contribution, and net margin as the same number.

Table of Contents
  1. The four profit formulas
  2. Worked Shopify order example
  3. How to choose the right layer
  4. A repeatable calculation workflow
  5. FAQs

An ecommerce profit calculator is only useful when the word “profit” has a defined cost scope. Gross profit, order contribution, and company net profit answer different questions. A calculator can estimate a planning layer from the inputs you provide; it cannot replace a period close or silently infer costs that are not in the model.

Use the Shopify Net Profit Calculator for a broader order and period scenario, the Gross Margin Calculator with Shipping for product and shipping layers, and the Shopify Profit Margin Calculator for a quick fee and ad contribution view.

The four profit formulas

Gross profit = net sales − cost of goods sold (COGS).

Gross margin = gross profit ÷ net sales × 100.

Order contribution = net sales − COGS − selected variable order costs.

Order contribution margin = order contribution ÷ matching net sales × 100.

Net profit = recognized revenue − COGS − operating expenses − other applicable expenses.

Net profit margin = net profit ÷ matching period revenue × 100.

COGS may include supplier cost and, under the business's accounting policy, inbound freight, duty, insurance, and production packaging. Payment processing, outbound fulfillment, advertising, payroll, rent, software, and taxes may sit below gross profit or in other lines. State the policy before comparing products or periods.

Worked Shopify order example

Suppose an order has $80 in net product sales, $32 in landed product cost, $7 fulfillment, $2.62 payment fees, $0.80 platform fees, and $18 acquisition cost.

  • Gross profit = $80 − $32 = $48.
  • Gross margin = $48 ÷ $80 = 60%.
  • Contribution before ads = $48 − $7 − $2.62 − $0.80 = $37.58.
  • Contribution after ads = $37.58 − $18 = $19.58.
  • Post-ad contribution margin = $19.58 ÷ $80 = 24.5%.

The $19.58 is not company net profit. The store still needs to account for returns, fixed payroll, software, rent, financing, taxes, and any costs omitted from the order model.

How to choose the right layer

Use gross profit to compare product cost and sourcing decisions when the COGS definition is stable. Use order contribution to set a price floor, evaluate a discount, or decide how much acquisition cost an order can carry. Use net profit for a period-level operating review after the accounting records include the relevant expenses.

Do not average percentages from unlike layers. A product with 60% gross margin can have 24.5% post-ad contribution margin in the same order, and neither percentage is the company's net margin. Compare matching revenue bases and list included costs beside the result.

A repeatable calculation workflow

  1. Define net sales: state how discounts, refunds, tax, and customer-paid shipping are treated.
  2. Define COGS and avoid counting landed freight or duty twice.
  3. Calculate gross profit and gross margin for the same units and period.
  4. Add fulfillment, payment, platform, return, and acquisition costs only when they belong to the decision.
  5. Reconcile the planning result to source reports and accounting records.
  6. Save the assumptions and date of each rate before comparing the next period.

For paid acquisition, compare actual CAC or CPA with the order's pre-ad contribution ceiling. For repeat purchases, use observed cohort data rather than assuming a future order will rescue a first-order loss. The Repeat Purchase Rate Calculator can show the historical customer ratio, but it does not forecast revenue.

FAQs

How do you calculate ecommerce profit?

Choose the profit layer first. For order contribution, subtract the defined product and variable order costs from net sales. For company net profit, subtract recognized COGS and operating expenses for the same accounting period.

Is gross profit the same as net profit?

No. Gross profit stops after the selected COGS. Net profit includes the operating and other expenses recognized for the period.

Should ad spend be included in gross margin?

Usually it is analyzed below gross profit, but accounting and management reports differ. If you include it in a contribution view, label the result as contribution after ads rather than changing the gross-margin definition.