Calculating product margin on PrestaShop and Shopify
Revenue tells you how much you sell, margin tells you how much you earn. You still have to compute it correctly, product by product, with the right costs. Formulas, PrestaShop and Shopify settings, and traps to avoid.
Gross margin, markup, margin rate
Three related ideas that often get mixed up. All of them are computed excluding tax:
- Gross margin = selling price − purchase cost. It is what you earn, in euros, on each sale.
- Markup = gross margin ÷ purchase cost. It tells you how much you add on top of your cost.
- Margin rate = gross margin ÷ selling price. It tells you what share of the selling price you keep.
Example: a product bought for €20 and sold for €50 (excluding tax) earns €30 of gross margin, a 150% markup and a 60% margin rate. Both figures describe the same sale; the classic mistake is comparing one product’s markup with another’s margin rate.
Entering your costs on PrestaShop
PrestaShop computes margin from the wholesale price (purchase price excluding tax) entered in the Pricing tab of the product page. If your combinations do not share the same cost (an XXL size that costs more to make, a larger format), enter a purchase price for each combination.
An empty or zero purchase price gives a 100% margin rate: the product looks extremely profitable and skews all your averages. Start by listing the products with no purchase price.
Entering your costs on Shopify
On Shopify, the field is called cost per item, in the Pricing section of every product and variant. Shopify’s profit reports, depending on your plan, only include sales whose cost was filled in at the time of sale: a cost added today does not apply to past sales.
The traps that inflate margin
A margin computed from the catalogue price alone is almost always too optimistic. Remember:
- Discounts and promo codes: margin is computed on the price actually paid, not the displayed price.
- Free shipping: the delivery you pay for without charging it comes off the margin.
- Payment fees: the commission taken on each transaction trims every sale by a few percent.
- Returns: a frequently returned product costs the cancelled sale, the shipping and sometimes the product itself.
- Changing costs: when a supplier raises prices, a margin that was right yesterday is wrong today if the cost is not updated.
Gross margin also ignores acquisition cost: a high-margin product sold only through expensive ads can earn less than a lower-margin product that sells on its own.
Tracking margin product by product
An average margin rate of 45% can hide products at 70% and others sold at a loss. Proper tracking is done per product and over time:
- Rank your products by total gross margin over 90 days, not just by revenue.
- Spot those whose margin drops from one month to the next: supplier price increase, discounts that are too frequent.
- Isolate those sold at a loss once discounts are applied.
- Look for the opposite too: high-margin products that no longer sell and deserve to be promoted.
Doing it without a spreadsheet
PrestaShop’s built-in statistics and Shopify’s reports focus on revenue: this kind of tracking usually takes regular exports. Lumexio computes your margins from your costs, product by product and variant by variant, spots products sold at a loss, and alerts you when a margin drifts or a high-margin product stops selling. Available for PrestaShop and Shopify.