No results found

Try a different search query

Popular searches:

Add to Cart

Cart

You have no purchases yet

Browse Marketplace
Original Subtotal:
Product discounts:
Quantity Discount:
Total:
View Cart
Store costs and economics

Unit economics for e-commerce: how to calculate profit per order

Step-by-step profit calculation per order: revenue, cost of goods, commissions, delivery, returns and advertising. With an example and an OpenCart database query.

8 min read

Unit economics of an online store is the calculation of how much you earn or lose on a single order after all the costs tied to it. If this remainder (called the contribution margin) is positive, each new order brings the store closer to profit. If it is negative, growing ad spend only increases losses. Below are the formula, an example with numbers, and how to get the data from OpenCartA free open-source CMS for online stores, written in PHP with a MySQL/MariaDB database. Everything that is not part of the core is added through extensions. More in the glossary →.

What is a unit, and which costs are part of an order?

A "unit" is the thing you sell and count. For most stores, it is one order. Less often, it is one customer (then LTV comes into play, which has a separate article: the store budget will also help you gauge the scale of costs). To start, use orders: they are in the database and easy to calculate.

Order costs fall into two groups:

  • Variable costs arise only together with an order: productA catalog item with a name, price, description, and photos. More in the glossary → cost of goods, packaging, shipping fees you pay, payment processing or cash-on-delivery commission, returns and refusals, advertising for that order, and manager work if it is paid per order processed.
  • Fixed costs include hosting, rent, salaries, and subscription modules. They are not part of unit economics, but they are covered by the accumulated contribution from all orders. How this adds up is covered in the topic on the break-even point.

A common mistake is calculating "margin" as the difference between the website price and the purchase cost. This is always overstated, because it ignores everything that happens after the customer clicks "Place order".

What is the profit formula for one order?

The basic formula is simple:

Внесок = Середній чек
       − Собівартість товарів
       − Комісії (оплата, післяплата)
       − Доставка і пакування за ваш рахунок
       − Втрати на повернення та відмовах
       − Витрати на залучення (CAC)

Use the average check based only on completed orders, not on all orders created: canceled and refused orders should not be included. VAT or the single tax also depend on your status. Account for them at the rate confirmed by your accountant, not "by eye".

It is useful to calculate two levels: contribution before advertising (everything except CAC) and contribution after advertising. The first shows whether the trade itself is healthy, the second shows whether the traffic pays for itself. The difference between them is the maximum you can pay for an order in advertising without going into the red.

What does this look like in an example?

Suppose a store sells home appliances. The figures are illustrative, so substitute your own.

ItemUAH per order
Average check of a completed order1,800
Cost of goods1,260
Payment system / cash-on-delivery commission45
Packaging20
Losses on refusals and returns (averaged)60
Contribution before advertising415
Advertising per order (CAC)380
Contribution after advertising35

Formally, the store is "in the black", but 35 UAH per order will not cover rent or salaries. If clicks get more expensive or the share of refusals rises, the order becomes unprofitable. The conclusion from the table: either raise the average check and markup, or lower CAC, or cut losses. Simply increasing the budget is not the answer.

How to calculate cash-on-delivery refusals separately is covered in the article on the cost of refusals. For now, it is enough to include them as an averaged amount: refusal share × (delivery there and back + packaging + "frozen" goods).

Where do I get the data for the calculation in OpenCart?

The basic figures are in the admin panel. Open "Reports" and "Sales → Orders": you can see the number and totals of orders by status there.

Order list: filter by status to separate completed orders from canceled ones
Order list: filter by status to separate completed orders from canceled ones · OpenCart 4.1.0.4

An important nuance: use only statuses that represent a real sale. Which statuses count as completed is set in the standard way under "System → Settings → Option → Complete Order StatusA stage of processing: "Pending," "Shipped," "Complete." Custom statuses are added in the dictionary. More in the glossary →" (key config_complete_status). It is not a single status but a list, and the core and reports rely on it. Therefore, calculate using the statuses from this setting, otherwise some completed orders will drop out of the calculation. The list of statuses itself is configured under "System → Localisation → Order Statuses".

Cost of goods is not stored in the standard product form. The "Model" field or SKU is not suitable for this. The cleanest option is a separate table or a Google Sheet with the item code and purchase price. For a quick estimate of the average check on completed orders, you can run a database query (replace the prefix oc_ with yours, and list in IN (…) the IDs of all statuses selected in the "Complete Order Status" setting):

SELECT
  COUNT(*) AS orders_count,
  ROUND(AVG(total), 2) AS avg_check,
  ROUND(SUM(total), 2) AS revenue
FROM oc_order
WHERE order_status_id IN (3, 5) -- ідентифікатори статусів із config_complete_status
  AND date_added >= DATE_SUB(CURDATE(), INTERVAL 90 DAY);

Which hidden costs usually eat up the margin?

Unit economics most often diverges from reality because some costs are simply not visible. Go through the list:

  • Discounts and coupons. The check in the report is already reduced, but the markup built into the price is not. Check the margin after the discount is applied. See the store launch guide and the separate topic on promotions without losing margin.
  • Free shipping. This is a direct cost per order. If the carrier charges 80–120 UAH per shipment (approximately, depending on weight and tariff) and the margin from the check is the same, the free shipping threshold must be calculated separately.
  • Returns and warranty replacements. Especially in appliances and clothing with sizes.
  • Manager work. If processing one order takes 10–15 minutes, that is real money even with a fixed salary.
  • Marketplace and price aggregator commissions, if some orders come from them. Count them as a separate channel.
  • Exchange rate differences. If you buy in dollars or euros but price in hryvnias, a frozen price quickly eats the margin.

A practical rule: calculate unit economics separately by channel (organic, Google Ads, Meta, marketplace) and by key categories. The store-wide average often hides a loss-making categoryA section of the catalog that contains products. It may have subcategories. More in the glossary → that is carried by a profitable product.

How much can I pay per order, and what should I do if the result is negative?

The upper limit for advertising equals the contribution before advertising. In our example, that is 415 UAH: you cannot pay more, and a realistic target is, for example, 250–300 UAH, so that some profit remains for fixed costs. How to determine this limit with repeat purchases taken into account is explained in the topic on CAC and LTV.

If the contribution is negative, act in the following order:

  1. Check the numbers: correct statuses, completed orders, real cost of goods.
  2. Find the largest item: it is often the purchase cost or CAC, not small commissions.
  3. Raise the check: bundles, upselling, and a free shipping threshold set slightly above the current average check.
  4. Reduce losses: prepaymentPayment before shipping. It reduces the number of unclaimed parcels. More in the glossary → for risky orders, phone confirmation, and removing low-margin products from the feed.
  5. Review prices by category and turn off advertising where the contribution after advertising is consistently negative.
  6. Only then scale up traffic.

For the overall picture of costs and budget, see the section "Store Cost and Economics".

Summary

  • Unit economics shows the profit from one completed order after all variable costs, including advertising.
  • Calculate two levels: contribution before and after advertising. The first sets the maximum for CAC.
  • Take data from completed orders ("Sales → Orders" and reports), and keep cost of goods separately, since OpenCart does not store it by default.
  • Do not forget about refusals, returns, shipping, commissions, and discounts: these are what break an "attractive" margin.
  • Calculate by channel and category, not just as a store-wide average.

Next steps: build a table with your figures for the last 90 days, find channels with a negative contribution, and stop or rebuild them. Then move on to calculating the break-even point to compare the contribution with fixed costs.

FAQ

How is unit economics different from regular margin?
Margin is usually calculated as the difference between the selling price and the purchase cost. Unit economics adds all costs that arise from a specific order: delivery, commissions, refunds and advertising.
Should rent and salaries be included in the calculation?
No, fixed costs are not part of unit economics. They are covered by the combined contribution of all orders, and the break-even point shows that ratio.
How often should unit economics be recalculated?
At least once a month, and each time carrier rates, commissions, exchange rates or advertising rates change.
Can cost of goods be taken directly from OpenCart?
The standard product form has no separate cost price field. Store it in a spreadsheet with SKUs or add it as a custom field or extension.
Was this article helpful?
Thanks for your feedback!

Related articles

Didn't find the answer?

Ask the community: OpenCart developers answer on the forum.

Ask on the forum
We use cookies

We use cookies and similar technologies to improve your experience, analyse traffic, and show personalised ads. Read our Cookie Policy for details.