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.
Free for up to 10 products · 14-day trial on paid plans
Updated
| Size | Modifier | Cost per item | Price |
|---|---|---|---|
| S | ×0.6 | $15.28 | $33.99 |
| M | base | $18.86 | $41.99 |
| L | ×1.5 | $23.59 | $52.99 |
ending(margin(cost, 55%), 0.99)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.
| Line | How it changes by size | S, ×0.6 | M, base | L, ×1.5 |
|---|---|---|---|---|
| Flour at $1.20/kg | Scales | 180 g · $0.22 | 300 g · $0.36 | 450 g · $0.54 |
| Dark chocolate at $14/kg | Scales | 150 g · $2.10 | 250 g · $3.50 | 375 g · $5.25 |
| Butter at $9/kg | Scales | 120 g · $1.08 | 200 g · $1.80 | 300 g · $2.70 |
| Sugar at $1.50/kg | Scales | 120 g · $0.18 | 200 g · $0.30 | 300 g · $0.45 |
| Eggs at $0.30 | Scales; S changed to 3 eggs | 3 pcs · $0.90 | 4 pcs · $1.20 | 6 pcs · $1.80 |
| Cream at $5.00/l | Scales | 180 ml · $0.90 | 300 ml · $1.50 | 450 ml · $2.25 |
| Cake box | Added by the size’s modifier, not scaled | 6 in · $0.90 | 8 in · $1.20 | 10 in · $1.60 |
| Baker, $18.00/h | Labor, doesn’t scale | 30 min · $9.00 | 30 min · $9.00 | 30 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.
| Size | Ingredients | Box + baker | Cost | Cost vs M |
|---|---|---|---|---|
| S, ×0.6 | $5.38 | $9.90 | $15.28 | 81% |
| M, base | $8.66 | $10.20 | $18.86 | 100% |
| L, ×1.5 | $12.99 | $10.60 | $23.59 | 125% |
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.
| Size | Cost | Price by size share | Margin | Price by a 55% margin rule | Margin |
|---|---|---|---|---|---|
| S | $15.28 | $25.19 | 39.3% | $33.99 | 55.0% |
| M | $18.86 | $41.99 | 55.1% | $41.99 | 55.1% |
| L | $23.59 | $62.99 | 62.5% | $52.99 | 55.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.
| Size | Price | Margin with $18.86 | Real cost | Real margin |
|---|---|---|---|---|
| S | $33.99 | 44.5% | $15.28 | 55.0% |
| M | $41.99 | 55.1% | $18.86 | 55.1% |
| L | $52.99 | 64.4% | $23.59 | 55.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:
| Size | Cost before → after | Rule price | Margin |
|---|---|---|---|
| S | $15.28 → $15.58 | $33.99 → $34.99 | 55.5% |
| M | $18.86 → $19.36 | $41.99 → $43.99 | 56.0% |
| L | $23.59 → $24.34 | $52.99 → $54.99 | 55.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.
- Open the product and choose “Base recipe and option modifiers” (or one of the other two set-ups).
- Enter the recipe of the base size, here M. Ingredient lines are marked “scales” as you add them.
- 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”.
- 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.
| Plan | Price | For products with variants |
|---|---|---|
| Free | $0 | Up 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/mo | Up to 150 products, option modifiers, unlimited price rules, price proposals and automatic mode |
| Growth | $39/mo | Unlimited products, ingredient stock deducted by orders for the exact size sold |
| Pro | $99/mo | Lots 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.
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.
Related
Shopify COGS
Cost per item calculated from each recipe and kept current when ingredient prices change.
Learn more →Margin-based pricing
Price rules that set Shopify prices from cost by markup, margin, cost plus or tiers, with rounding and margin guards.
Learn more →Gifts and flowers
Hamper and bouquet costing for gift basket businesses and florists: products, stems, waste, packaging, labor and margin-based prices.
Learn more →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