The formula
At its core, inventory value at cost is:
inventory value = Σ (quantity on hand × unit cost)
summed over every item you hold, on a given date. Each part of that sentence hides a choice.
Which quantity?
Shopify tracks several quantity states for each variant and location. The two that matter for valuation:
- On hand: the units physically in the location, including units committed to orders not yet fulfilled;
- Available: on hand minus committed and unavailable units — what you can still sell.
For an accounting stock figure, on hand is the usual basis, since committed units still belong to you until they ship. Shopify's own inventory reports have measured stock by on-hand quantity since October 1, 2026. Whatever you choose, use the same basis every period.
Which cost?
In Shopify, the unit cost is the Cost per item field of each variant (Shopify help). Shopify records the cost on each order when the order is created, which feeds profit reports. On the product itself, there is one current value: a new cost replaces the old one.
That is why the date matters. Valuing December 31 stock with costs edited in February gives a different figure from the one you would have had on December 31.
Cost vs retail value
| Value | At cost | At retail (catalogue price) |
|---|---|---|
| Formula | quantity × unit cost | quantity × selling price |
| Used for | balance sheet, cost of goods sold | an idea of selling potential |
| Caution | needs a cost on every item | not revenue: assumes everything sells at full price |
The difference between the two is a potential gross margin, before discounts, returns and unsold stock. Try it with your own figures in our inventory value calculator.
Costing methods: FIFO, weighted average and others
Accounting frameworks allow several ways to assign costs to the units you still hold:
- FIFO (first in, first out): the oldest units are considered sold first, so remaining stock carries the most recent costs;
- Weighted average cost: every unit carries the average cost of the units purchased;
- Specific identification, or retail methods in some sectors.
Shopify stores one cost per variant; it does not run these methods for you. Which one applies to your financial statements, and whether you can change it, depends on your country's rules and is your accountant's call. A dated record of quantities and of the cost per item recorded each day gives them a consistent starting point.
Mistakes to avoid
- Missing costs counted as zero. A variant without a cost silently lowers the total. List them and fix them; keep them out of the total until then.
- Mixing dates. Quantities from one day and costs from another produce a figure that never existed.
- Adding currencies. Costs in another currency than the store's must be converted by your accountant, not added as they are.
- Negative stock. Overselling can make on-hand negative. Count it as zero and investigate, rather than letting it reduce the value of other items.
- Untracked items. Gift cards and services do not track inventory and should not be valued.
Doing it every day, automatically
StockLedger applies these rules for you every night: on-hand (or available) quantity, the cost per item of that day, per location, with missing costs flagged and never counted as zero, and the result frozen in a snapshot you can export.
This guide describes software features and general practice. It is not accounting, tax or legal advice: check with your accountant for your situation.