How much does each product cost on average?

Topic summary

Shopify recently introduced a “cost per item” field allowing merchants to track product costs and calculate profit margins. The feature is optional and appears in product settings alongside pricing.

Key Implementation Details:

  • Margin calculation formula: ([price - cost] / price) * 100
  • Available through the Inventory Items API (requires separate API calls)
  • Not exposed in Liquid/theme templates for front-end display
  • Only affects profit reports from the date costs are entered (no backdating capability)

Major User Concerns:

Calculation accuracy: Questions raised about whether margin calculations account for VAT/taxes correctly in regions like the UK

Limited functionality: Users want bulk import/update options for cost data via CSV with SKU matching, ability to backdate costs for historical profit analysis, and weighted average costing when supplier prices fluctuate

API & customization: Developers seeking to display cost data on storefronts or in custom apps, integrate with third-party tools (Zapier), and include in notification emails to dropshipping partners

Unresolved Issues:

  • Cannot retroactively apply costs to calculate past profit margins
  • No bulk update mechanism beyond API
  • Cost field not accessible in Liquid templates (workaround: use metafields)
Summarized with AI on November 19. AI used: claude-sonnet-4-5-20250929.

Greetings,

Might be just me not using this option but noticed this today:

Imgur
](Imgur: The magic of the Internet)

Saw nothing about this in shopify news.

Regards,

Decha

Hey, Decha!

I’m Alex, with the Shopify team!

Thanks for reaching out! That’s a new feature that we’ve only just rolled out - that option allows you to track the cost of the goods that you’re selling. There’s more information on it in our guide right over here, under pricing!

This feature is entirely optional, and isn’t a required field when you’re creating your products - so you needn’t worry about filling it out if you’d rather not. However, if you do choose to make use of it, once you’ve filled that in with the price of your product your profit margin will be calculated for you, like so:

If you’re on the Shopify plan or higher, you’re also able to produce reports to analyze your profit margins!

Hope that’s helped! Please feel free to let me know, and you can always give us a call or start a live chat at any time. We’re open 24/7 for your convenience and always happy to assist!

Cheers,

Alex | Shopify

1 Like

Hi Alex, as the accountant for the Drift Record Shop I am delighted to see that entering the cost price is now available, a dream for stock/inventory management, i.e. getting that Closing Stock value for the annual accounts.

However I’m not sure that the margin calculation is correct?

Shopify - For each product that has a product cost entered, the margin (calculated as ([price - cost] / price) * 100) is shown on the product details page. For example, if your price is $50 and your cost is $30, then the margin (calculated as ([50 - 30] / 50) * 100) is 40%.

I think this falls down here in the UK because cost is net of VAT, but price includes VAT, or have I missed something?

Shopify - Price - The price that you’re charging for the product. You set the currency on the General settings page. Click Charge taxes on this product if the product is taxable.

If the product has been noted as taxable, does the margin take this in to account, i.e. net selling price? This would be the correct way in my opinion.

I look forward to hearing from you,

Thanks and kind regards,

Graeme

4 Likes

Hi Alex,

Thanks for your explanation on this feature. This has long been something that the platform has been missing and I’m sure this will be a very welcome addition.

For us this feature is fairly limited thoughas suppliers cost prices tend to flutuate depending on whether they’re running promos or are clearing through inventory etc.

One suggestion I might make is to have an option to add the cost price of items in whenever we’re receiving new stock through your transfers feature. The price of the new product coming in could then be averaged with the price of the previous stock received to give a true cost price and an exact margin read out.

Thanks again,

Rich

1 Like

Hi Alex,

Are there any plans to include the new field in the Product/Product Variant API?

We have a user that is wondering if its possible for our app to use the Cost per item field.

Cheers!

3 Likes

Are there any plans to include the new field in the Product/Product Variant API?> > We have a user that is wondering if its possible for our app to use the Cost per item field.

I am also keen to know this too.

1 Like

The “cost per item” from the store admin UI is included as the field “cost” on inventory items. With the API, inventory items are not included as part of the response with either product or variant, so you’ll need to make a separate call(s) to get them.

Is it possible to only get inventory items that have changed? I cannot hit the endpoint where recrds have been “updated since” . If the invemtory is updated, the variant is not so I cannot monitor it through the variant either. any ideas?

Really wish they made it easy to update.

Like, import update that only needs SKU and Cost. Of course, with the option to ignore ‘Cost’ on SKUs that don’t exist in the Shopify store.

We use a separate inventory software that keeps track of the cost, but if we want to import into Shopify, we’d have to use a VLOOKUP. And anyone’s who has used that function knows it’s not entirely flawless.

Can customers see what you put in the “cost per item” Might be a silly question, but I just wanted to make sure before I start using it. Also, If i have the lowest Shopify plan, can I run a report showing me “my profit” instead of total sales? Can it show me what we made after what we paid for each item?

I noticed that after I added a cost to inventory that already existed, it did not affect the Gross Profit section under the Finance Report. Does that mean that I needed to put the cost in at the time I added inventory? And only future sales will apply this cost for reports? Not past sales?

Why is it that I can only see the margin and the profit when the ‘charge tax on this product’ tick box is checked? Is there any other way of seeing this, or if I leave this option unchecked will it affect anything else?

Is there any way to display cost per item? Like product.price, but product.cost_per_item? I understand most won’t want to use this, but we actually have a use for it.

1 Like

We also need that,

as for this example

{% if customer and customer.tags contains 'admin' %} {{ product.cost }}

All admins can then be allowed to see the cost price, but we can’t find the “Cost price key word”

product.price_cost

product.cost_price

product.cost

Anyone know?

1 Like

Cost price isn’t exposed in Liquid for use on the front end (the theme). It’s not a field that merchants would generally want to expose.

For those that do need it, what is the use case for that?

Id like a reply on this too.
The help screen basically says.. it calculates profit based on where the item had a product cost at the time of the transaction.

So if we entered all our product costs today.. we cant look at the profit for last month. Only for todays date moving forward.

This seems to be a stupid restriction. We should be able to backdate a product cost to whenever we started selling the item.

Very frustrating. Im trying to work out the profit margin for a particular sales staff member but there is no way of doing this because last month, half the products didnt have costs entered.

1 Like

Well we have several reasons to use this, first of all, one of the our partners is an old man who do not understand a Computer very well, and to allow him full access to the Admin module Products could be a disaster, but his user account on the website could be given permission to see the Cost price, and along with that the profit. Using the code below.

And for me, I would find it much more easy to look thru our 5000 products on the User platform, to look for prices that needs adjustment, the User platform is much better than the Admin platform to do this, never ending task.

{% if customer and customer.tags contains 'admin' %}
 Vendor: {{ product.vendor }} <br> Cost Price: {{ product.cost }}
 {% endif %}
2 Likes

@Sjalalen stow it in a metafield ; if it’s a lot of products either through the api or using a spreadsheet app.

For a handful using the bulk editor

Hi Brian did you ever work out how to backdate it? We need to be able to see the backdated cost too but can’t work it out.

No you cant unfortunately. Support confirmed this.

1 Like