---
title: "Set prices from cost using margin or markup"
description: "Calculate selling prices from cost per item, distinguish margin from markup, and understand what happens when a variant has no cost."
url: https://price-editor-help.platmart.io/en/articles/11-set-prices-from-cost-using-margin-or-markup
collection: "Price changes"
updated: 2026-11-16
language: en
---

# Set prices from cost using margin or markup

Calculate selling prices from cost per item, distinguish margin from markup, and understand what happens when a variant has no cost.

Use a task on **Product prices** to calculate selling prices from **Cost per item**. Margin and markup use different formulas. These features require Advanced or Premium and are not available for market-price changes or sales.

## Margin and markup are different

<table style="min-width: 75px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Goal</p></th><th colspan="1" rowspan="1"><p>Calculation</p></th><th colspan="1" rowspan="1"><p>With a cost of 20</p></th></tr><tr><td colspan="1" rowspan="1"><p>50% margin</p></td><td colspan="1" rowspan="1"><p>Cost divided by 1 minus the margin</p></td><td colspan="1" rowspan="1"><p>Selling price 40</p></td></tr><tr><td colspan="1" rowspan="1"><p>50% markup</p></td><td colspan="1" rowspan="1"><p>Cost plus 50% of that cost</p></td><td colspan="1" rowspan="1"><p>Selling price 30</p></td></tr></tbody></table>

Margin is the difference between price and cost as a share of the selling price. Markup is that difference as a share of cost. These calculations use Shopify's cost per item, not your total business expenses, shipping charges or payment fees.

## Set a target margin

1.  Click **Create task**.
    
2.  Select **Product prices**.
    
3.  Under **Price**, choose **Set margin**.
    
4.  Enter the target margin in **Percent**.
    
5.  Under **Compare at price**, select **Don't change compare at price** and **No rounding** to preserve that field.
    
6.  Under **Cost per item**, select **Don't change cost per item** and **No rounding**.
    
7.  Select the products under **Apply to** and review exclusions.
    
8.  Click **Create** when ready to apply.
    

The margin must be greater than 0 and less than 100. For a 60% margin on a cost of 20, the calculated price is 50. Currency precision can affect the final margin.

## Set a markup on cost

1.  Click **Create task** and select **Product prices**.
    
2.  Under **Price**, choose **Increase price**.
    
3.  Set **Relative to** to **Cost per item**.
    
4.  Set **Change type** to **By percent**.
    
5.  Enter the markup in **Percent**.
    
6.  Under **Compare at price**, select **Don't change compare at price** and **No rounding** to preserve that field.
    
7.  Under **Cost per item**, select **Don't change cost per item** and **No rounding**.
    
8.  Select the products under **Apply to** and review exclusions.
    
9.  Click **Create** when ready to apply.
    

**Increase price** here means an increase from cost, not from the current selling price. A variant costing 20 and currently selling for 50 will become 30 with a 50% markup. The result can lower an existing selling price.

## Check costs before running the task

The cost-based calculation needs a positive cost for each variant. Missing or zero costs cannot produce the requested margin or markup. Fill in those costs first and check the task's **Details** afterward. Other selected actions or rounding settings are separate, so do not assume a missing cost prevents every possible change to that variant.

Changing a selling price from cost does not itself update the cost field. To preserve cost, keep both **Don't change cost per item** and **No rounding** selected. Rounding can change cost even when its action says not to change it.

This is a one-time calculation. It does not continuously recalculate selling prices whenever a supplier changes costs. Start with a [small live test](https://price-editor-help.platmart.io/en/articles/2-test-your-first-price-change.md).

To update the cost field itself, follow [change cost per item without changing selling prices](https://price-editor-help.platmart.io/en/articles/22-change-cost-per-item-without-changing-selling-prices.md).
