Costory Install free

Shopify pricing app · price rules from cost

Cost-plus and margin-based pricing for Shopify

Cost-plus pricing sets each price from what the product costs: cost × (1 + markup), cost ÷ (1 − margin) or cost plus a fixed amount. Costory does it for every Shopify variant, rounds to endings like .99, and holds your minimum margin when ingredient prices rise.

Install free on Shopify

Free for up to 10 products · 14-day trial on paid plans

Updated

Price proposal
Brownie box
Cost changed

Dark chocolate $14.00 → $16.00 / kg

Cost per item
$6.12 → $6.52
Price
$13.99 → $14.99
Margin at the new cost
53.4% → 56.5%
Rule ending(margin(cost, 55%), 0.99)
  • Change +7.1%, within the ±15% limit
  • Not below cost
An example proposal. Proposals and one-click apply are on Starter and up.
Short answer

To price Shopify products by cost, you need each product’s cost and one rule. Costory calculates the cost from the recipe (or uses your Cost per item), applies a rule such as ending(margin(cost, 55%), 0.99) and writes the price to Shopify when you apply it, or on its own in automatic mode. A Brownie box that costs $6.12 sells for $13.99, a 56.3% margin; when chocolate goes up and the cost becomes $6.52, the rule proposes $14.99, a 56.5% margin.

Markup vs margin vs cost plus: what each does to a $6.12 cost

Costory has four presets that turn a product’s cost into a price: Markup, Margin, Cost plus and Tiered margin. You pick one in a form; Costory turns it into a formula you can open and edit.

Markup

price = cost × (1 + markup)

A 100% markup doubles the cost, the classic “keystone” price. The profit is a fixed share of the cost.

Margin

price = cost ÷ (1 − margin)

A 55% margin keeps 55 cents of every dollar of the price as gross profit, whatever the product costs.

Cost plus

price = cost + amount

The same dollars of profit on every product, for example $7.00 on top of the cost.

Tiered margin

a margin per cost band

Up to $4 of cost → 65%, up to $12 → 58%, above → 48%: up to 10 tiers, set in a table.

Four presets on the Brownie box, cost $6.12
Preset Setting Price Margin With .99 ending Margin
Markup100%$12.2450.0%$12.9952.9%
Margin55%$13.6055.0%$13.9956.3%
Cost plus$7.00$13.1253.4%$13.9956.3%
Tiered margin58% (the up to $12 tier)$14.5758.0%$14.9959.2%

Margin is (price − cost) ÷ price. For the Margin row: $6.12 ÷ (1 − 0.55) = $13.60, and with the .99 ending ($13.99 − $6.12) ÷ $13.99 = 56.3%. The $6.12 cost comes from the recipe: dark chocolate 200 g at $14/kg ($2.80), butter 150 g at $9/kg ($1.35), sugar 180 g at $1.50/kg ($0.27), 3 eggs at $0.30 ($0.90) and a gift box ($0.80). Costory also writes that cost to Shopify’s Cost per item: see how Shopify COGS is calculated from recipes.

The same presets on three costs, with the .99 ending
Preset $2.40 cost $6.12 cost $24.00 cost
Markup 100%$4.99 · 51.9%$12.99 · 52.9%$48.99 · 51.0%
Margin 55%$5.99 · 59.9%$13.99 · 56.3%$53.99 · 55.5%
Cost plus $7.00$9.99 · 76.0%$13.99 · 56.3%$31.99 · 25.0%
Tiered 65% / 58% / 48%$6.99 · 65.7%$14.99 · 59.2%$46.99 · 48.9%

Markup and margin keep the margin steady at any cost. Cost plus gives cheap products a high margin (76.0% at a $2.40 cost) and expensive ones a thin one (25.0% at $24.00). Tiered margin bends it on purpose: more margin on low-cost items, where a few cents matter, and a lower one on expensive items so they stay competitive.

Each preset is a formula underneath. The tiered rule above with the .99 ending is:

ending(margin(cost, if(cost <= 4, 65%, if(cost <= 12, 58%, 48%))), 0.99)

To check a single price by hand first, try the free margin calculator.

How does .99 price rounding work?

Rounding in a Costory preset goes up, to the next step or the next price with your ending, so it adds margin instead of eating into it. The table rounds the Margin 55% price of the Brownie box, $13.60 on a $6.12 cost.

Rounding a $13.60 price (cost $6.12)
Rounding Formula Price Margin
No roundingmargin(cost, 55%)$13.6055.0%
Up to a step of $0.25ceil(…, 0.25)$13.7555.5%
Up to a step of $1ceil(…, 1)$14.0056.3%
Ending .95ending(…, 0.95)$13.9556.1%
Ending .99ending(…, 0.99)$13.9956.3%
Ending 4.99ending(…, 4.99)$14.9959.2%
Ending 9ending(…, 9)$19.0067.8%

How endings work

An ending replaces as many digits as it has. 0.99 changes only the cents. 4.99 also sets the last dollar digit: the first price ending in 4.99 at or above $13.60 is $14.99. 9 sets the last digit of a whole price, so $13.60 jumps to $19.00, $5.40 more. Whole-digit endings suit prices in the tens and hundreds; on small prices, stay with cents.

If your prices include VAT, a preset counts the margin on the price without VAT and rounds the price your customer sees: ending(margin(cost, 40%) * (1 + vat), 0.99).

A minimum price for low-cost items

A minimum price is a floor for products whose cost is tiny. A cookie that costs $0.85 would sell for $1.99 under Margin 55% with the .99 ending. With a $3.00 minimum price it sells for $3.00, a 71.7% margin.

max(ending(margin(cost, 55%), 0.99), 3)

Next to the formula, Costory explains the rule in plain words: “Cost ÷ (1 − 55%), then up to the ending 0.99, but not less than 3”.

How do I keep a minimum margin when costs go up?

Guards are limits on every price rule that stop a formula from setting a price you would not want. Defaults live in Costory’s settings, and each rule can override them.

Price guards and their defaults
Guard Default What it does
Not below costOnA price below cost is not applied.
Minimum marginOffRaises the price to the margin you set, keeping the rule’s rounding, or blocks the change: your choice.
Maximum change at once±15%A bigger change waits for your confirmation, even in automatic mode.
Only raise pricesOffAutomation does not lower prices: a lower price waits for your confirmation.
Minimum step1%Smaller changes are not proposed, so prices do not move over pennies.
Pause between changes0 daysA change within N days of the product’s last one waits for your confirmation.

Minimum margin, worked through

Cost plus $7.00 with the .99 ending prices a $24.00 product at $31.99, a 25.0% margin. With a 40% minimum margin set to raise the price, Costory takes the threshold $24.00 ÷ (1 − 40%) = $40.00 and applies the rule’s ending: $40.99, a 41.4% margin.

Maximum change, worked through

If dark chocolate jumps from $14 to $20 a kg, the Brownie box cost goes from $6.12 to $7.32 and the rule price from $13.99 to $16.99. That is +21.4%, over the ±15% limit, so even an automatic rule leaves it in Proposals for you. The smaller move to $16 a kg ($6.52 cost, $14.99 price, +7.1%) passes.

How do I bulk update Shopify prices when costs change?

When a cost changes, Costory recalculates every variant it affects and lists the new prices as proposals you apply in one batch, or sends them to Shopify on its own in automatic mode; both are on Starter and up. A bulk price editor changes many prices by an amount or a percentage you pick; a Costory rule starts from each variant’s own cost, so one batch can price a $2.40 product at $5.99 and a $24.00 one at $53.99. Each rule’s mode decides how its prices reach Shopify.

How a rule’s price reaches Shopify
Mode What happens Plan
Only showThe rule price shows in Costory and on the product page; you apply it there, product by product.Free and up (on Free, every rule works this way)
With confirmationThe default. New prices go to Proposals with the current price, the new price and the margin before and after. Apply a whole group, selected rows, dismiss or pin the current price.Starter, Growth, Pro
AutomaticallyChanges within the guards go to Shopify right away; the rest wait in Proposals.Starter, Growth, Pro
Apply on scheduleAn option of the two modes above: confirmed changes go out at a time you set, such as 3:00 store time, so prices do not change in the middle of the day.Starter, Growth, Pro

What triggers new prices

  • An ingredient price changes: every product that uses it is recalculated
  • A purchase arrives at a new price, delivery costs included (Growth and Pro, see landed cost)
  • A rule, a constant or the order of rules changes
  • A product’s tags, collections or type change in Shopify
  • A market’s exchange rate changes (Pro)

History and rollback

Every price change is logged with the product, old and new price, the reason (such as “Dark chocolate $14.00 → $16.00”), who applied it and when. A group shows how many prices went up or down and the average margin before and after. Roll back one change or the whole group, as long as no newer change has replaced that price.

Prices you set by hand

Pin a variant to keep its price out of every rule; products tagged manual-price are pinned automatically (you can pick another tag in Settings). If someone changes a price by hand in Shopify, Costory notices it and asks whether to pin the new price or restore the rule price.

Price formulas for special cases: tags, collections, sizes and metafields

When a preset is not enough, a rule can use a formula built from the same functions the presets compile to. The editor checks it as you type and shows the result on a sample product.

Formulas on the Brownie box (cost $6.12)
Case Formula Price
65% margin for products tagged premiumif(has_tag("premium"), ending(margin(cost, 65%), 0.99), ending(margin(cost, 55%), 0.99))$17.99 tagged, $13.99 not
60% margin in one collectionif(in_collection("gift-boxes"), ending(margin(cost, 60%), 0.99), ending(margin(cost, 55%), 0.99))$15.99 in gift-boxes
50% margin on the Large sizeending(margin(cost, if(option("Size") == "Large", 50%, 55%)), 0.99)$18.99 for Large ($9.18 cost)
An extra cost kept in a metafieldending(margin(cost + meta("custom.extra_cost"), 55%), 0.99)$16.99 with 1.50
A card fee kept as a constantending(margin(cost, 55%) / (1 - card_fee), 0.99)$14.99 with 0.03
A price corridor of $9.99 to $49.99clamp(ending(margin(cost, 55%), 0.99), 9.99, 49.99)$9.99 on a $2.40 cost

What a formula can use

Functions: markup, margin, round, ceil, floor, ending, min, max, clamp, if, has_tag, in_collection, option and meta. Variables: cost and its parts materials, labor and overhead, the current price and compare_at, prev_cost, weight, vendor, product_type, plus constants you define, such as a card fee.

The Large size costs $9.18 here because an option modifier, L ×1.5, scales the recipe lines you mark as scalable, in this example all of them: $6.12 × 1.5 = $9.18 (option modifiers are on Starter and up). A product with no cost yet gets no rule price; the Overview counts it among products without a cost, with a link to add one.

Which rule prices which product

A rule covers all products or a scope of collections, tags, product types, vendors or chosen products, with exclusions. Each variant follows exactly one rule: the one assigned to its product by hand, otherwise the first matching rule in your order, otherwise the Default rule. The product page says which rule applies and why.

Compare-at prices and Shopify Markets

A rule can also set the compare-at price: leave it as it is, clear it, or calculate it with its own formula. On the Pro plan, a rule can price a Shopify Market in that market’s currency.

Compare-at price from the new price

ending(new_price * 1.25, 0.99)

new_price is the price the rule sets, after rounding and guards. For the Brownie box: $13.99 × 1.25 = $17.4875, rounded up to $17.99, so the compare-at price stays at least 25% above the price your customer pays.

Prices per Shopify Market (Pro)

ending(margin(cost * market_rate, 55%), 0.99)

The market preset converts the cost first. At a market rate of 0.95, the $6.12 cost is 5.814 in the market currency and the price is 12.99. Costory writes it as a fixed price to the market’s price list; markets without their own rule keep Shopify’s conversion. The margin and the below-cost check are counted in your store currency.

Which Costory plan do price rules need?

Price rules work on every plan; what changes is how many rules you have and how their prices reach Shopify. Paid plans start with a 14-day trial and are billed by Shopify in USD.

Price rules by plan
Plan Price For pricing
Free$01 price rule, applied by hand on the product page; recipes and costs for up to 10 products
Starter$12.99/moUnlimited price rules, proposals with batch apply, automatic and scheduled modes, option modifiers; up to 150 products with recipes
Growth$39/moEverything in Starter for unlimited products, plus purchases and suppliers, so costs and prices follow what you pay, delivery included
Pro$99/moPrices per Shopify Market, staff roles, Shopify Flow, API and webhooks
Install free on Shopify

Start on Free with one rule. Compare all plans

Questions about cost-plus and margin pricing

What is cost-plus pricing?

Cost-plus pricing sets a selling price by adding a markup to the unit cost: price = cost × (1 + markup), or cost plus a fixed amount. A product that costs $6.12 with a 100% markup sells for $12.24, a 50% margin. Costory applies such a rule to every Shopify variant from its calculated cost, so the price moves when the cost does.

What is the difference between markup and margin?

Markup is profit as a share of cost; margin is profit as a share of price. A 100% markup and a 50% margin give the same price: $6.12 × 2 = $12.24, and $6.12 ÷ (1 − 50%) = $12.24. A margin stays below 100%, so a 55% target margin means price = cost ÷ 0.45.

Can Costory update all my Shopify prices at once?

Yes, on Starter and higher plans. When costs or rules change, Costory groups the new prices as proposals with the margin before and after, and you apply a whole group or selected rows in one go. In automatic mode, changes within your guards go to Shopify without a click. On the Free plan you apply the rule price product by product on the product page.

Will Costory change my prices without asking?

Only if you set a rule to Automatically, which is available from Starter. The default mode is With confirmation: new prices wait in Proposals until you apply them. Even in automatic mode, a change above the maximum change guard (±15% by default) waits for your confirmation, and a price below cost is not applied.

Can price rules price products I resell, without a recipe?

Yes. A product without a recipe is priced from the Cost per item you already keep in Shopify, or from its last purchase price once you record purchases (Growth and Pro). The same markup, margin or cost-plus rule then applies to it as to the products you make, and Costory keeps your own Cost per item instead of overwriting it.

Can I undo a price change made by Costory?

Yes. Every change Costory writes to Shopify is logged in History with the old price, the new price, the reason and who applied it. You can roll back one change or the whole group an action made, as long as no newer change has replaced that price since.

Does Costory set prices for Shopify Markets?

Yes, on the Pro plan. A market rule prices in the market currency, for example ending(margin(cost * market_rate, 55%), 0.99), and Costory writes the result as a fixed price to that market’s price list. The margin and the below-cost check are counted in your store currency.

Let your prices follow your costs.

Free for up to 10 products. Paid plans start with a 14-day trial.

Install free on Shopify