Showing stock per variant tells a shopper two useful things: whether their size is available, and whether they should decide today. Done well, "Only 3 left in Medium" is honest and helpful. Done badly, it is a fake countdown that buyers learn to ignore. Here is how to set it up on Shopify and which thresholds we suggest to merchants.
Before you show stock
Stock messages only work if Shopify is tracking inventory for that variant. Open the product, click a variant and make sure "Track quantity" is ticked and the count is right for each location. If you sell print-on-demand items that never run out, skip this page: a stock counter on an item you can always make is misleading.
New to tracking? The inventory guides linked at the end of this post cover the setup screens step by step.
Native Shopify display
In theme code, the stock count for the selected variant is available as {{ variant.inventory_quantity }}. Most themes that show stock wrap it in a small piece of conditional logic so the message changes with the number: "Low stock" under 5, "Sold out" at 0, nothing at all above 10.
Because the selected variant changes as the shopper clicks, the message should update too. Online Store 2.0 themes handle that refresh for you when you use their built-in block.
Theme setting
Dawn and many other free themes include an "Inventory status" block for the product page. Add it in the theme editor under Product information, then set the low-stock threshold. Shoppers see "Low stock: 2 left" when a variant drops below that number and "In stock" above it.
If your theme has no such block, a developer can add one in an hour or so using the Liquid value above. An app is rarely needed for this alone.
Threshold strategy
These thresholds work for most small stores. Adjust them to how fast a variant usually sells.
| Units left | What to show | Why |
|---|---|---|
| More than 10 | Nothing, or "In stock" | A big number adds nothing and can make an item look unpopular |
| 5 to 10 | "Low stock" | A soft nudge without a number |
| 1 to 4 | "Only 3 left" | The real number helps a shopper who is deciding |
| 0 | "Sold out" or "Notify me" | Captures demand you would otherwise lose |
For merchant-side warnings, where you get an email before a variant runs out, see our guide to low-stock alerts for variants.
Multi-location
If you stock items in more than one location, decide which number shoppers see. Showing the total across all locations is simpler. Showing only the location that ships to the customer is more accurate when delivery times differ a lot between warehouses.
Shopify stores a count per location for each variant. Our guide to multi-location inventory for variants explains how the counts add up and how fulfillment priority works.
Sold-out variants
You have three choices when a variant hits zero:
- Show it as sold out, crossed out or greyed in the picker. Shoppers see the full range and know it exists.
- Hide it so the picker only shows what can be bought today. This suits large ranges where half the colors are out.
- Keep selling with "Continue selling when out of stock" turned on, and say clearly that the item ships later. Our guide to continue selling when out of stock covers the settings.
Hiding works well for long color lists. We walk through the setup in how to hide sold-out variants. Whatever you pick, be consistent across the store.
When not to show stock
Skip stock counts on made-to-order and personalized items. A custom name necklace or a printed photo mug is made after the order comes in, so "Only 2 left" is not true. For these products, a production time line ("Ships in 3 to 5 business days") does more for the buyer.
Also skip it on wholesale catalogs with deep stock, where every count would be in the hundreds.
Common mistakes
- Showing counts that are not tracked. If tracking is off, the number on the page is meaningless.
- Low-stock text on every product. When everything is "almost gone", buyers stop believing it.
- Forgetting the feed. Your Google Shopping availability comes from the same inventory data, so a wrong count shows up there too.
- Not testing on mobile, where the stock line often gets pushed below the Add to Cart button.
Frequently asked questions
How do I show inventory per variant on Shopify?
Add the Inventory status block to your product page in the theme editor, if your theme has one, and set a low-stock threshold. In custom themes, a developer can use {{ variant.inventory_quantity }} to print the count for the selected variant.
When should I show low-stock messaging?
A simple rule: say "Low stock" at 5 to 10 units, "Only X left" at 1 to 4, and "Sold out" or a notify-me button at zero. Above 10, show nothing.
Does urgency messaging help sales?
It can help when the message is true and used sparingly, because it answers a real question for the shopper. If every product says it is almost gone, buyers stop trusting it.
Should I show total or ship-from-only inventory?
It depends on your multi-location setup. The total is simpler to show; the ship-from count is more accurate when your locations have different delivery times.
How do I hide inventory when stock is high?
Only show the message below a threshold, for example 10 units. A line like "145 in stock" adds nothing for the shopper.
Does inventory affect Google Shopping?
Yes. Your product feed sends availability (in stock, out of stock or preorder) for each variant, and Google shows it to shoppers. Keep your counts accurate so the feed matches the page.
How do I set up notify-me emails for out-of-stock variants?
Use a back-in-stock app or an email tool such as Klaviyo. The shopper subscribes to the specific variant and gets an email when it is restocked.
Can I show inventory only to logged-in customers?
Yes, with a small theme edit that checks customer tags. A common setup shows exact counts to wholesale customers and hides them from retail shoppers.
Related reading
Sources & further reading
Primary sources referenced in this article. We link to official platform documentation and standards bodies rather than secondary summaries so you can verify claims directly.
- Shopify Help Center: Product variants
- Shopify.dev: Product variant limits
- Shopify Help Center: Line item properties (customization)
Try it free on Shopify
Print It My Way's permanent Free plan includes live preview, custom options, and Cart Transform pricing.
Install Print It My Way