Built for Shopify 4.8★(45) Free plan available
Pricing setup

How to Set Shopify Prices From Cost and Target Profit Margin

Calculate Shopify selling prices from Cost per item and a target margin, then preview, round, apply, schedule, and restore bulk price changes with Springify.

Published

Quick answer

Selling price = Cost per item ÷ (1 − Target margin ÷ 100). A $60 cost and a 40% target margin produce a $100 selling price. Adding a 40% markup would produce $84 and a 28.6% margin instead.

For bulk updates, use Springify's Set target profit margin action, select the products, and preview calculated prices before applying or scheduling the change. Check rounding and unexpected price decreases before you apply it.

Calculate prices from cost and target margin

To calculate a selling price from cost and a target profit margin, use:

Selling price = Cost per item ÷ (1 − Target margin ÷ 100)

For a product that costs $60 and needs a 40% margin:

$60 ÷ (1 − 0.40) = $100

At a $100 selling price, the difference between price and cost is $40—40% of the selling price. Adding 40% to the cost would produce $84 instead, which does not give you a 40% margin. Shopify uses the same price-based margin calculation in its product pricing details.

For bulk updates, Springify’s Set target profit margin action lets you configure the target, choose the products, and preview calculated prices before applying the change. You can also schedule the update and restore saved original values when needed.

The examples below use prices excluding tax and costs in the same currency as the selling price.

Profit margin and markup are not the same

Margin measures the difference between selling price and cost as a percentage of the selling price.

Markup measures that difference as a percentage of cost. The denominator changes, so the same percentage produces a different selling price. Shopify explains this distinction in its guide to markup and margin.

For a product with a $60 cost:

Pricing approachCalculationSelling priceResulting margin
Add a 40% markup$60 × 1.40$8428.6%
Set a 40% margin$60 ÷ 0.60$10040%

To check the resulting margin:

Margin = (Selling price − Cost per item) ÷ Selling price × 100

A margin target is also different from a percentage increase to your current price. Increasing an existing price by 40% does not establish a 40% margin unless the resulting price happens to satisfy the formula.

Check Cost per item before calculating prices

In Shopify, Cost per item records what the product or variant costs you. Products with variants need a cost entered for each variant; do not assume one value covers every size, material, or configuration. Shopify also supports adding costs in bulk through its bulk editor or a product CSV. See Shopify’s Cost per item documentation.

Before applying cost-based pricing, check that the selected variants have current, meaningful cost values. A missing cost is not the same as a product that genuinely costs nothing.

If a supplier has changed its prices, update Cost per item first, then calculate selling prices from those updated values. Leave variants with missing or uncertain costs outside the update until their inputs are ready.

This is not a net-profit guarantee

A margin calculated from Price and Cost per item only accounts for those inputs. Expenses that are not included in the cost—such as payment processing, fulfillment, advertising, or overhead—still affect what the business earns. Shopify’s pricing guidance recommends considering these costs when setting prices.

Tax-inclusive pricing also needs separate consideration. Do not interpret a simple calculation using a tax-inclusive selling price and tax-exclusive cost as your margin after tax. Shopify notes that tax-inclusive pricing can make profitability depend on the destination’s tax rate.

How to set target-margin prices in bulk with Springify

The calculation is straightforward. The practical work is applying it to the right variants, checking the results, choosing when the update happens, and keeping a way to restore the previous prices.

Springify brings those steps into one bulk-pricing workflow: configure the pricing action first, select the products, preview the changes, then apply or schedule them.

Step 1: Set the target margin

In Springify’s Price settings, choose Set target profit margin and enter the percentage you want to use—for example, 40%.

Use a margin you have chosen for that product group, rather than treating the example percentage as a recommended target.

For regular repricing, there is no need to turn the update into a sale. Review Compare-at settings separately instead of automatically copying the old selling price into Compare-at.

Step 2: Decide how to round the result

Springify supports price-rounding options, including .99 endings. But rounding changes the actual price, so it can also change the resulting margin.

For example, a $20 cost and a 40% target produce an unrounded price of $33.333…:

Final selling priceMargin on a $20 cost
$32.9939.38%
$33.9941.16%

Both prices end in .99, but only one stays above the 40% target.

If your target is a minimum margin, the final price must stay at or above the calculated threshold. Check the result of the rounding rule rather than assuming a preferred price ending preserves the exact percentage.

Step 3: Choose the products and exclusions

Select the products that should use this margin. Springify supports targeting by collections, vendors, tags, and other conditions, as well as specific products or variants and exclusions.

For example:

Apply a 40% target margin to products from Vendor A, excluding clearance items and products with incomplete costs.

Use separate updates for groups that need different targets. A clearance collection and a new premium range do not need to share one margin simply because they belong to the same catalog.

Step 4: Preview the calculated prices

Click Prepare products for review to inspect the affected variants and their current and new prices before applying the update.

For example, a 40% target would produce these results before optional rounding:

VariantCost per itemCurrent PriceCalculated Price
Small$18$35$30
Medium$30$45$50
Large$48$80$80

Notice that the first price goes down, the second goes up, and the third stays the same.

Setting an exact target margin is not the same as increasing prices or enforcing a minimum margin. A product already priced above the target can calculate to a lower price.

During review, look for unexpected decreases, unusually large increases, incorrect selections, and rounding results that fall below your intended margin. Compare suspicious results with the variant’s stored cost before applying anything.

Step 5: Apply now or schedule the update

For an immediate update, review the preview and click Apply changes. After completion, check representative variants in Shopify Admin and on the storefront.

If the new pricing should begin later, use Springify’s scheduling workflow. This lets you prepare the update separately from the moment it needs to go live. For the detailed process, see How to Schedule Shopify Sale Prices.

A permanent repricing update does not need an automatic end date. A temporary change can include scheduled restoration.

Step 6: Keep a way to restore the previous prices

Springify saves the original values when an update runs. Rollback changes restores those saved values, so you do not have to reconstruct every previous price manually. The guide to running and ending a Shopify sale explains this restoration workflow.

Check for subsequent edits before rolling back. If another update, integration, or manual edit changed the same prices afterward, restoring an older snapshot can overwrite those newer values. Rollback restores a previous pricing state—not necessarily prices that still meet your current margin target.

Recalculate when supplier costs change

Suppose a product costs $60 and sells for $100. Its margin is 40%.

Your supplier increases the cost to $66. Keeping the selling price at $100 reduces the margin to:

($100 − $66) ÷ $100 × 100 = 34%

To return to a 40% margin:

$66 ÷ (1 − 0.40) = $110

That is why cost-based repricing is different from simply keeping the existing selling price.

Once the new costs are recorded, calculate and review a new update for the affected products. Setting prices from a target once does not guarantee that the same margin survives later cost changes.

Allow for discounts after setting your regular prices

A regular price that meets your target can fall below it during a promotion.

For example:

Cost per item: $60
Regular Price: $100
Regular margin: 40%

20% discount → customer pays $80
Margin after the discount: ($80 − $60) ÷ $80 = 25%

A 20% discount does not reduce a 40% margin to 20%. The selling price and the denominator both change.

Shopify’s profit reports use net sales, so discounts and refunds can make the reported margin differ from the projected margin shown on the product details page.

Before launching a promotion, check the margin at the discounted selling price, not just at the regular catalog price.

FAQ

Can I calculate target-margin prices without an app?

Yes. Use the formula in a spreadsheet and enter or import the resulting prices. Shopify’s native bulk editor and product CSV workflow are alternatives when you already have the final values prepared.

A dedicated pricing app is useful when you also want targeting, calculated previews, scheduling, and restoration in the same workflow. See How to Bulk Edit Prices on Shopify: Bulk Editor vs CSV vs Apps for a comparison.

Does Compare-at price affect the target-margin calculation?

No. The calculation uses the selling Price and Cost per item, not the reference price.

Compare-at can be used to display a higher reference price alongside the selling price. Review existing Compare-at values after repricing so the storefront still presents the intended pricing. See the Shopify Compare-at Price guide for more detail.

What happens if a variant has no cost?

There is no reliable cost-based target price to calculate without a valid cost input. Fill in the cost or exclude that variant before applying the update. Do not substitute zero just to complete the calculation.

Is a 40% target margin right for every product?

No. Forty percent is an example, not a benchmark. Choose a target that makes sense for your product costs, other expenses, planned promotions, and the prices your customers are willing to pay. Different product groups may need different targets. Shopify’s pricing guidance covers the factors to consider.

Get started

Set the margin. Review the prices. Choose when they change.

With Springify Bulk Price Editor, configure cost-based pricing, select the relevant products, preview calculated changes, and apply them now or schedule them for later. Saved original values provide a way back when a change needs to be reversed.