Costory Install free

Free tool for Shopify sellers · COGS per unit

Product cost calculator: cost of goods sold per unit

Work out what one item really costs you (materials with waste, packaging, labor and overhead) and the price that keeps your margin after payment fees. Free, no sign-up; your numbers stay in your browser.

Calculate your cost per unit

Formula and a worked example below · copy the result or download a CSV

Updated

Short answer

To calculate the cost of goods sold per unit, add up what one item uses: materials (quantity × unit cost, grossed up for waste), packaging, labor (minutes × hourly rate ÷ 60) and a share of overhead (monthly overhead ÷ items made per month). An 8 oz soy candle with $4.92 of materials, $0.85 of packaging, $2.00 of labor and $1.50 of overhead costs $9.27 to make. To keep a 60% margin after a 2.9% + $0.30 card fee, it sells for $25.99.

Calculate cost per unit and price

Enter what one item uses. The example is an 8 oz soy candle; replace it with your own product. Use the same unit for the quantity and the unit cost (ounces and price per ounce, pieces and price per piece).

Materials per item

Packaging, labor and overhead

Price

Margin is the share of the price you keep after the cost and the fee. The fixed fee is charged per order. Example fee: 2.9% + $0.30, Shopify Payments’ standard online card rate on the Basic plan in the US (see payment fees). Clear both fields to price without a fee.

How do you calculate cost per unit?

Cost per unit is everything one item uses, added up: materials, packaging, labor and a share of overhead. It is the cost of goods sold of a single item, and the number every price should start from.

material line = quantity per item × unit cost ÷ (1 − waste %)

labor = minutes per item × hourly rate ÷ 60

overhead per item = monthly overhead ÷ items made per month

cost per unit = materials + packaging + labor + overhead

Materials and waste

List every material one item uses, with its quantity and unit cost in the same unit: ounces of wax at the price per ounce, one jar at the price per jar. Waste grosses the line up: if 4% of the wax stays in the pouring pitcher, the wax in one candle costs 8 × $0.18 ÷ 0.96 = $1.50, not $1.44.

Packaging

What leaves with every item: the box, tissue, label, insert or bag. Count each piece once, either here or in your shipping costs, so it is neither missing nor charged twice.

Labor

Minutes of hands-on work per item × an hourly rate ÷ 60: 6 minutes at $20 an hour is $2.00. For batch work, divide the batch time by the items it makes; a 2-hour pour of 20 candles is 6 minutes a candle.

Overhead

Rent, utilities, software, equipment and other monthly costs ÷ the items you make in a month. $900 over 600 candles is $1.50 a candle; in a slower month of 400 candles it is $2.25.

Worked example: what does an 8 oz soy candle cost to make?

An 8 oz soy candle costs $9.27 to make: $4.92 of materials, $0.85 of packaging, $2.00 of labor and $1.50 of overhead. These are the calculator’s starting numbers, so you can follow each one above.

8 oz soy candle: cost per unit
PartCalculation per candleCost
Soy wax 8 oz × $0.18 ÷ (1 − 0.04) $1.50
Fragrance oil 0.8 oz × $1.75 $1.40
Cotton wick 1 pcs × $0.12 $0.12
Glass jar with lid 1 pcs × $1.90 $1.90
Materials$4.92
Packagingbox, tissue and insert for one candle$0.85
Labor6 min × $20.00 / h ÷ 60$2.00
Overhead$900 a month ÷ 600 candles$1.50
Cost per unit (COGS of one candle)$9.27

From cost to price

To keep a 60% margin after a 2.9% + $0.30 card fee, the price has to cover the cost, the fee and the margin at once:

price = (cost + fixed fee) ÷ (1 − margin − fee %)

= ($9.27 + $0.30) ÷ (1 − 0.60 − 0.029)

= $9.57 ÷ 0.371 = $25.80, rounded up to the cent

with a .99 ending: $25.99

fee = $25.99 × 2.9% + $0.30 = $1.05

profit = $25.99 − $9.27 − $1.05 = $15.67

margin after fees = $15.67 ÷ $25.99 = 60.3%

The cost per unit, $9.27, is the number that belongs in Shopify’s Cost per item for this candle; the fee stays out of it, because it depends on the order rather than on the product. Candle, soap and skincare makers can read more about costing formulas in grams and per-kg prices, and food makers can start from the recipe cost calculator.

What is the cost of goods sold formula?

There are two COGS formulas, and they answer different questions: cost per unit tells you what to charge for one item, and the accounting formula tells you what the goods you sold in a period cost you.

COGS = beginning inventory + purchases − ending inventory

The accounting formula works from your stock counts, not from recipes. Count what materials and packaging you have at the start of the month, add everything you bought during it, and subtract what is left at the end: the difference is what went into the goods you made.

Divided by the items made and sold, it gives an actual cost per item to set beside your calculated one. Here the two meet: $3,462 ÷ 600 candles = $5.77, the $4.92 of materials plus $0.85 of packaging per candle in the worked example.

When the period figure comes out higher than your per-unit numbers, the gap is waste, breakage, samples or a price increase your per-unit cost does not include yet. A business that makes its goods can also put direct labor and production overhead into inventory; which costs your books count is a question for your accountant. For pricing, count them either way.

November cost of goods sold: materials and packaging
Beginning inventory, November 1$2,400
+ Purchases during November$3,212
− Ending inventory, November 30$2,150
= Cost of goods sold, November$3,462
Per candle (600 made and sold)$5.77

Margin vs markup: what price gives a 60% margin?

Margin is profit as a share of the price; markup is profit as a share of the cost, so the same percentage gives two very different prices. A $9.27 candle marked up 60% sells for $14.83, a 37.5% margin; a 60% margin needs $23.18, a 150% markup.

Price of a $9.27 item by margin, before fees, rounded up to the cent
MarginSame as markupPrice
30%42.9%$13.25
40%66.7%$15.45
50%100%$18.54
60%150%$23.18
70%233.3%$30.90

margin = (price − cost) ÷ price

markup = (price − cost) ÷ cost

price for a margin = cost ÷ (1 − margin)

Shopify shows margin next to a variant’s price once it has a Cost per item, so a target set as a margin compares directly with what you see in the admin. If you think in markup, convert it: markup = margin ÷ (1 − margin). The margin calculator does the conversion both ways.

How do payment fees change the price?

A payment fee is taken from the price, so it has to be built into the price: a price set for a 60% margin before fees keeps less than 60% after them. Without the fee in the formula, the candle would sell for $23.99; the 2.9% + $0.30 fee on that price is $1.00, which leaves $13.72 of profit, a 57.2% margin. With the fee built in, $25.99 keeps 60.3%.

Shopify lists 2.9% + 30¢ as the standard online card rate on its Basic plan in the US (Shopify, credit card processing fees, updated October 2026). Other plans, countries and cards have other rates, and with a payment provider other than Shopify Payments, Shopify adds its own transaction fee, 2% on Basic (Shopify pricing). Put the rate from your own payouts into the calculator.

The fixed part is charged once per order, not per item. The calculator charges it to every item, which is right for one-item orders and cautious for larger ones: an order of three candles pays the $0.30 once.

Sell on Shopify? Costory does this for every product

Costory is a Shopify app that calculates each product’s cost from its recipe (materials, packaging, labor and overhead), writes it to Shopify’s Cost per item for every variant, and recalculates it when a material price changes. Shopify’s profit reports then use real costs, without retyping a spreadsheet.

  • Materials in metric units: grams, kilograms, milliliters, liters, centimeters, meters, square meters or pieces, bought in packs such as a 10 kg case of wax or a box of 100 wicks, each with its own waste percentage.
  • Batches with a yield: a recipe that makes 20 candles gives each one a twentieth of the batch’s materials and labor.
  • Labor and overhead on every plan, including Free: labor lines with roles and hourly rates, and overhead as a percentage, a fixed amount per item, or monthly expenses ÷ planned quantity.
  • Cost per item written to Shopify for every variant; products you resell keep the Cost per item you entered.
  • Prices that follow costs: a price rule by margin with a .99 ending, applied by hand on the product page on Free; proposals that show the margin before and after, applied in a batch (Starter and up).
  • Sizes and options: option modifiers such as S ×0.6 and L ×1.5 give each variant its own cost (Starter and up).
  • Profit after fees: the profit reports can show profit and margin after a payment fee percentage you set.

Plans

Free for up to 10 products with recipes. Starter $12.99 a month for up to 150 products; Growth $39 and Pro $99 have no product limit and add ingredient stock, purchases and more. Paid plans start with a 14-day trial and are billed by Shopify in USD.

How the numbers reach Shopify: Shopify COGS and Cost per item · margin-based pricing

Questions about product cost and COGS

How do I find the unit cost of a material I buy in bulk?

Divide what you paid for the pack, shipping included, by the units it holds, in the unit your product uses. A 10 lb bag of soy wax holds 160 oz, so at $28.80 delivered it costs $28.80 ÷ 160 = $0.18 an ounce; a box of 100 wicks for $12 is $0.12 a wick. Work it out again whenever you reorder at a new price.

How do I calculate cost per unit when I make products in batches?

Add up what the whole batch uses and divide it by the items you can sell from it, not the items you planned. A pour that uses $98.40 of materials and makes 20 candles costs $4.92 a candle in materials; if one candle cracks and 19 can be sold, the same batch costs $98.40 ÷ 19 = $5.18 a candle. Divide the batch’s labor time the same way.

Should labor and overhead be part of product cost?

For pricing, yes: your time and your rent are paid out of every sale, even if you do not pay yourself a wage yet. In the candle example, labor ($2.00) and overhead ($1.50) are 38% of the $9.27 cost per unit. Which costs your books count as COGS depends on your accounting method, so check that with your accountant.

Are payment fees and shipping part of the cost per unit?

Not in this calculator. A payment fee depends on the price and the payment method, and the shipping you pay to send an order depends on the order, so both are handled per order rather than per product; the calculator builds the payment fee into the price, so the margin you enter is what is left after it. Shipping you pay to receive materials is different: add it to the pack price before you work out each material’s unit cost.

How often should I recalculate my product costs?

Every time a material’s price changes, because a price that stays put loses margin quietly. If soy wax goes from $0.18 to $0.20 an ounce, the 8 oz candle’s wax goes from $1.50 to $1.67 and its cost from $9.27 to $9.44; at an unchanged $25.99, the margin after a 2.9% + $0.30 fee falls from 60.3% to 59.6%. Keeping 60% takes $26.26, or $26.99 with a .99 ending.

Does this calculator save or send my numbers?

No. The calculation runs in your browser, and nothing you type is sent to Costory or stored by the page. To keep a result, use “Copy result” or “Download CSV”, which saves the materials, the cost per item, the price and the margin as a spreadsheet file.

Can Costory keep my product costs up to date in Shopify?

Yes. Costory is a Shopify app that calculates each product’s cost from its materials, packaging, labor and overhead, writes it to Shopify’s Cost per item for every variant, and recalculates it when a material price changes. It is free for up to 10 products; paid plans start at $12.99 a month with a 14-day trial.

Get the real cost of every product, not just one.

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

Install free on Shopify