Costory
EN
Install free

Costs for Shopify variants: sizes and options

Shopify variant costs: one recipe, the right cost for every size

Each Shopify variant has its own Cost per item, and a small, medium and large size rarely cost what their ingredients alone suggest. Costory works out every variant’s cost from one recipe, scaling the lines you choose by the size, and writes each result to that variant in Shopify.

Install free on Shopify

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

Updated

Base recipe and option modifiers
Chocolate layer cake
3 variants synced
Modifier, cost and price of each size of the cake
SizeModifierCost per itemPrice
S×0.6$15.28$33.99
Mbase$18.86$41.99
L×1.5$23.59$52.99
Price rule ending(margin(cost, 55%), 0.99)
Ingredients scale with the size; the baker’s 30 minutes and the box don’t.
An example product: one recipe, three sizes, three costs in Shopify.
Short answer

The cost of a Shopify variant is the cost of what goes into that exact size or option: the scaled ingredients plus the parts that don’t scale, such as labor and packaging. A chocolate cake whose medium size costs $18.86 costs $15.28 as a small (ingredients ×0.6) and $23.59 as a large (×1.5), because the baker’s $9.00 of time stays the same. Costory calculates this for every variant from one recipe with option modifiers (Starter plan and up), writes each cost to that variant’s Cost per item and recalculates all sizes when an ingredient price changes.

How do you calculate the cost of each variant on Shopify?

Each variant’s cost is its own recipe total: the lines that grow with the size multiplied by the size’s factor, plus the lines that stay the same for every size. Shopify stores Cost per item per variant, so a product in three sizes needs three costs, not one.

Variant cost = Σ scaled lines × size multiplier + fixed lines
line cost = quantity × price per unit ÷ (1 − waste)

Here is the cake from the top of this page. The medium size is the base recipe. The small size scales the marked ingredients by 0.6 and the large by 1.5; each size adds a box of its own, and the small size uses 3 whole eggs instead of 2.4.

Chocolate layer cake: the cost of one cake in each size
LineHow it changes by sizeS, ×0.6M, baseL, ×1.5
Flour at $1.20/kgScales180 g · $0.22300 g · $0.36450 g · $0.54
Dark chocolate at $14/kgScales150 g · $2.10250 g · $3.50375 g · $5.25
Butter at $9/kgScales120 g · $1.08200 g · $1.80300 g · $2.70
Sugar at $1.50/kgScales120 g · $0.18200 g · $0.30300 g · $0.45
Eggs at $0.30Scales; S changed to 3 eggs3 pcs · $0.904 pcs · $1.206 pcs · $1.80
Cream at $5.00/lScales180 ml · $0.90300 ml · $1.50450 ml · $2.25
Cake boxAdded by the size’s modifier, not scaled6 in · $0.908 in · $1.2010 in · $1.60
Baker, $18.00/hLabor, doesn’t scale30 min · $9.0030 min · $9.0030 min · $9.00
Cost per item$15.28$18.86$23.59

Medium: ingredients $8.66 + box $1.20 + baker $9.00 = $18.86. Large: ingredients $8.66 × 1.5 = $12.99, + box $1.60 + baker $9.00 = $23.59. Small: the scaled ingredients come to $5.20, but 3 eggs instead of 2.4 add $0.18, so $5.376 + box $0.90 + baker $9.00 = $15.276, written to Shopify as $15.28.

The small cake’s eggs are a line changed only for that variant. Such a change is an exact quantity, so the 0.6 multiplier doesn’t touch it. To work out a single recipe without the sizes first, try the free recipe cost calculator.

Why doesn’t a smaller size cost proportionally less?

A smaller size costs less only on the lines that shrink with it; labor, packaging and other fixed lines cost the same for every size. That is why the small cake, with 60% of the ingredients, still costs 81% of the medium one.

What part of each size’s cost scales
SizeIngredientsBox + bakerCostCost vs M
S, ×0.6$5.38$9.90$15.2881%
M, base$8.66$10.20$18.86100%
L, ×1.5$12.99$10.60$23.59125%

The more of a product’s cost is time and packaging, the less its sizes differ in cost. Copying the medium’s cost to every variant, or scaling the whole cost by the size, gets both ends wrong. How the baker’s time and the rent get into a cost in the first place is on the Shopify COGS page.

Product options pricing: how should you price each size?

Price each size from its own cost, not as a share of the medium size’s price, or the small size loses most of its margin. The table compares pricing the sizes by their ingredient share (60% and 150% of the medium price) with pricing each one by the same 55% margin rule.

Two ways to price the same three sizes
SizeCostPrice by size shareMarginPrice by a 55% margin ruleMargin
S$15.28$25.1939.3%$33.9955.0%
M$18.86$41.9955.1%$41.9955.1%
L$23.59$62.9962.5%$52.9955.5%

Rule price for S = $15.28 ÷ (1 − 0.55) = $33.96, ending in .99 → $33.99
Margin = ($33.99 − $15.28) ÷ $33.99 = 55.0%

Priced by size share, the small cake at $25.19 keeps 39.3%, and the large one at $62.99 may be priced above what customers will pay for it. A margin rule gives every size the same margin from its own cost. You can still choose different targets: a formula can read the option, as in if(option("Size") == "S", ending(margin(cost, 50%), 0.99), ending(margin(cost, 55%), 0.99)), which prices the small cake at $30.99 with a 50.7% margin. Presets, guards and rounding are on the margin-based pricing page; for a single price, use the margin calculator.

What goes wrong with one Cost per item for all variants?

One Cost per item copied to every variant makes the small size look less profitable and the large size more profitable than they are. Shopify’s profit reports then show the wrong margin for both ends of the range, and the large size can look like the one to promote when it earns no more than the others.

The cake with the medium’s $18.86 copied to every size
SizePriceMargin with $18.86Real costReal margin
S$33.9944.5%$15.2855.0%
M$41.9955.1%$18.8655.1%
L$52.9964.4%$23.5955.5%

Each large cake would report $34.13 of profit instead of $29.40, $4.73 too much, and each small cake $3.58 too little. More on how Shopify uses this field is in the guide to Shopify Cost per item.

How option modifiers work in Costory

An option modifier belongs to one option value, such as Size: L, and changes the base recipe for every variant with that value: it multiplies the lines marked to scale, adds lines of its own, or both.

Three ways to describe variants

One recipe for all variants, a base recipe and option modifiers, or a separate recipe for each variant. You choose per product, so a cake can use modifiers and a gift set separate recipes.

Multipliers for scaled lines

S ×0.6 turns 250 g of chocolate into 150 g on the small size, and the breakdown shows the real quantity. Lines marked “scales” follow the multiplier; the rest stay as they are.

Extra lines per option

A modifier can add lines: a bigger box for L, or 150 g of raspberries at $16/kg for Topping: Berries, $2.40 on M. Marked to scale, the berries are $1.44 on S and $3.60 on L.

Several options at once

Multipliers of different options multiply: Size L ×1.5 and Layers: Double ×2 scale the marked lines by 3. Extra lines from each option add up.

Changes for one variant

“Change only for” sets an exact line for one variant, like the small cake’s 3 eggs, and the multiplier leaves it alone. “Remove only for” drops a line from one variant.

Labor stays the same by default

New ingredient and semi-finished lines scale; labor and products inside the recipe don’t, since a small cake takes about as long to make. “Scale by option” in a line’s menu changes that.

How does Costory write Cost per item for each variant?

Costory writes each variant’s own cost to that variant’s Cost per item in Shopify, rounded to the cent of your store currency, and writes it again whenever the cost changes. The setting “Write costs to Shopify” turns this on or off for the whole store.

  • Every variant of a product with a recipe gets its own cost: three sizes, three values in Shopify.
  • A variant added later in Shopify is costed from the base recipe and the modifiers that match its options. A value with no modifier yet, or a renamed one, is flagged on the product page and in Needs attention.
  • Products without a recipe keep the Cost per item you entered in Shopify.
  • When an ingredient price changes, every size that uses it is recalculated, each by its own quantity.

Say dark chocolate goes from $14 to $16 per kg. The small cake uses 150 g, so it costs $0.30 more; the medium $0.50 and the large $0.75 more. The same 55% rule then gives new prices for each size:

Dark chocolate from $14 to $16 per kg
SizeCost before → afterRule priceMargin
S$15.28 → $15.58$33.99 → $34.9955.5%
M$18.86 → $19.36$41.99 → $43.9956.0%
L$23.59 → $24.34$52.99 → $54.9955.7%

On Free you apply a rule’s price by hand on the product page. From Starter, the new prices come as proposals with the margin before and after each change, or go out automatically if you choose that mode.

How to set up variant costs in Costory

Variant costs are set up on the product page in Costory, in the Shopify admin, in four steps.

  1. Open the product and choose “Base recipe and option modifiers” (or one of the other two set-ups).
  2. Enter the recipe of the base size, here M. Ingredient lines are marked “scales” as you add them.
  3. Add a modifier for each size: S ×0.6 with its 6 in box, M with no multiplier and its 8 in box, L ×1.5 with its 10 in box. A box added as an ingredient is marked “scales” too, so switch each box to “Do not scale by option”.
  4. Switch to a variant to check its breakdown, change a line only for it if needed, then save. Costory writes the cost of every variant to Shopify.

CSV import and export carry the base recipe’s ingredient lines; modifiers and changes for one variant are set on the product page.

What variants get on each plan
PlanPriceFor products with variants
Free$0Up to 10 products with recipes, one recipe for all variants or a recipe for each, changes for one variant, Cost per item per variant
Starter$12.99/moUp to 150 products, option modifiers, unlimited price rules, price proposals and automatic mode
Growth$39/moUnlimited products, ingredient stock deducted by orders for the exact size sold
Pro$99/moLots with expiry dates, multiple locations, prices per Shopify Market

The plan limit counts products, not variants, so a cake in three sizes is one product. Paid plans start with a 14-day trial and are billed by Shopify; see pricing. Selling bouquets in several sizes? The gifts and flowers page shows the same approach for stems and wrap.

Install free on Shopify

Questions about variant costs

Do I need a separate recipe for every variant?

No. A product in Costory uses one of three set-ups: one recipe for all variants (they differ only by color or a card), a base recipe with option modifiers (sizes that scale), or a separate recipe for each variant (variants that are really different products). On any of them you can still change or remove a single line for one variant.

Does labor scale with the size of the variant?

Not by default. New ingredient and semi-finished lines scale with option modifiers, while labor lines and products inside the recipe stay the same, because a baker spends about the same time on a small cake as on a medium one. Any recipe or modifier line can be switched with “Scale by option” or “Do not scale by option” in its menu.

What happens when I add a new size to the product in Shopify?

Costory picks up the new variant and calculates its cost from the base recipe with the modifiers that match its option values. If the new value has no modifier yet, or a value was renamed so that its modifier no longer matches, the variant is flagged on the product page and in Needs attention until you set the modifier and save the recipe again.

What if two options both change the recipe?

Their multipliers multiply and their extra lines add up. A Size L modifier of ×1.5 and a Layers “Double” modifier of ×2 scale the marked lines by 3, and a Topping “Berries” modifier that adds 150 g of raspberries adds them on top, scaled by the size too if that line is marked to scale.

Does a product with many variants count as several products on my plan?

No. The plan limit counts products with a recipe, not variants: a cake in three sizes is one product of the 10 on Free or the 150 on Starter. Option modifiers need Starter ($12.99 a month); on Free, each variant can have a recipe of its own instead.

Can small and large sizes have different target margins?

Yes. A price rule formula can read the variant’s option value, for example if(option("Size") == "S", ending(margin(cost, 50%), 0.99), ending(margin(cost, 55%), 0.99)). With the cake on this page, that prices the small size at $30.99, a 50.7% margin, and leaves M and L on the 55% rule.

Can Costory cost choices made in a product options app?

Only if they are real Shopify variants. Option modifiers match the option names and values of Shopify variants, and Shopify keeps Cost per item per variant. Choices a product options app adds to the order as line item properties have no variant, so they get no Cost per item of their own.

Give every size its own cost in Shopify.

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

Install free on Shopify