Stock Reconciliation is how you tell ERPNext the truth about what's actually on the shelf — to set opening stock at go-live, to correct the system after a physical count, or to clear a quantity that has drifted wrong. It's a simple DocType that people get wrong in small, expensive ways: entering 0 where they meant blank, duplicating an item-warehouse row, or forgetting the valuation rate. This guide walks the correct path for each goal, the CSV rules that actually matter, and how to clear the errors it throws.
Reconciling to escape a negative-stock error?
If you're here because ERPNext is blocking a submit with "stock cannot be negative", read the negative-stock fix guide first — a reconciliation is sometimes the right fix, but often the real problem is posting sequence, which a reconciliation won't address.
A clean stock reconciliation is the difference between an inventory you can trust and one you spend every month-end arguing with. I am Manoj, ERPNext and Frappe implementation lead at Mith Tech in Bengaluru; setting opening stock correctly is the first thing we get right on every go-live.
What Stock Reconciliation is for
Stock Reconciliation sets an absolute quantity (and optionally a valuation rate) for an Item in a Warehouse at a point in time. Unlike a Stock Entry, which records a movement of goods, a reconciliation states a fact: "as of this date, there are exactly this many units, worth this much." ERPNext then computes the difference against what the system thought it had and posts the adjustment. Per the official documentation, it's the tool for opening balances and for correcting system stock to a physical count.
Because it states an absolute truth, two rules follow that catch people out: each Item-Warehouse combination may appear only once, and a blank field means "leave unchanged" — not zero.
Which goal are you reconciling for?
The right Purpose and method depend on what you're doing. Pick your goal:
Select what you're trying to achieve to get the correct Purpose value and the method to use.
What are you trying to do with the reconciliation?
Opening stock at go-live
At go-live you need every item's starting quantity and value in the system. Do it with a single Stock Reconciliation, Purpose = Opening Stock, dated at your cut-off. This is far cleaner than entering dozens of backdated Stock Entries: it's one document, one posting, and it won't trigger a chain of Repost Item Valuation jobs the way backdated movements do. If a repost does get stuck afterwards, our Repost Item Valuation guide covers clearing it.
Adjusting after a physical count
When a stock-take finds the shelf doesn't match the system, reconcile to the counted number, Purpose = Stock Reconciliation. ERPNext posts the difference to your Stock Adjustment account. Leave the valuation rate blank to keep the current rate; set it only if you intend to revalue.
When it won't submit
The errors are few and predictable. Pick the one you hit:
Select the error ERPNext throws on submit to get its cause and the fix.
Pick the error you hit on submit.
The 0-versus-blank trap costs people real stock
This is the single most common reconciliation mistake. In both the grid and the CSV template, a blank quantity or valuation rate means "don't change this". A 0 means "set this to zero". Upload a CSV with 0 in the quantity column for rows you didn't intend to touch, and you've just zeroed live stock. When in doubt, leave it blank.
Do it: UI, CSV, and tracked items
The manual UI steps, the CSV template rules, and the extra care batch and serial items need.
The manual path for a handful of items.
1. Stock > Stock Reconciliation > New
2. Purpose:
• "Opening Stock" — first-time / go-live balances
• "Stock Reconciliation" — adjust to a physical count
3. Set Posting Date + Time (the cut-off the count is true as of)
4. Add rows: Item Code, Warehouse, Qty, Valuation Rate
5. Save > Submit
ERPNext posts the difference to the Stock Adjustment account
(Perpetual Inventory) and rewrites the affected Stock Ledger.Open a new Stock Reconciliation and pick the Purpose
Stock > Stock Reconciliation > New. Choose Opening Stock for first-time balances or Stock Reconciliation for count adjustments.
Set the posting date and time
Enter the cut-off the counted quantities are true as of. Getting this right matters for valuation sequencing and for any later backdating guard.
Enter items — once each, blank to keep
Add each Item Code and Warehouse a single time. Enter the actual quantity. Provide a valuation rate for anything introduced from zero; leave fields blank (never 0) to keep existing values.
Submit and verify
Submit. Under perpetual inventory the difference posts to the Stock Adjustment account. Re-open the item's Stock Balance to confirm the new quantity and value are what you counted.
Reconcile, or is another tool right?
FAQ
+How do I set opening stock in ERPNext?
Create a single Stock Reconciliation with Purpose set to "Opening Stock", dated at your go-live cut-off, and enter each item's quantity and valuation rate once. This is cleaner than backdated Stock Entries and avoids triggering a chain of valuation reposts.
+What's the difference between Opening Stock and Stock Reconciliation purpose?
"Opening Stock" is for establishing first-time balances, typically at go-live. "Stock Reconciliation" is for adjusting existing system stock to match a physical count later on. Both set an absolute quantity; the purpose mainly signals intent and affects how the opening is treated.
+Why do I get a valuation rate mandatory error in Stock Reconciliation?
Because you're introducing a positive quantity for an item that had no existing stock, so ERPNext has no prior rate to reuse. Enter a valuation rate for that row. For rows you don't want to change, leave both quantity and rate blank rather than entering zero.
+Can I upload stock reconciliation in bulk via CSV?
Yes. Download the CSV template from a new Stock Reconciliation, enter Item Code and Warehouse exactly as they exist, and fill quantity and valuation rate. Leave a field blank to keep the current value — never enter 0 unless you genuinely mean to set it to zero. No duplicate Item + Warehouse rows.
+Why can't I submit a backdated Stock Reconciliation?
From v15.80, ERPNext blocks backdated stock entries when a later Stock Reconciliation already exists, to protect the reposted valuation sequence (#49861). Post the correction in the current period, or sequence it before the later reconciliation.
+Does a Stock Reconciliation affect my accounts?
Under perpetual inventory, yes — ERPNext posts the difference between the counted and system quantity to your Stock Adjustment account, so your stock ledger and General Ledger move together. Under non-perpetual setups it adjusts stock quantities without the automatic GL posting.
+Does this work the same in ERPNext v14, v15 and v16?
The core Stock Reconciliation workflow is the same across v14, v15 and v16. The differences are in guards and batch/serial handling — for example the v15.80 backdating block (#49861) and batch valuation fixes (#40168) — so confirm behaviour on your specific release for tracked items.
Closing
Stock Reconciliation is one of the simplest DocTypes in ERPNext and one of the easiest to misuse. Remember the two rules — one row per Item-Warehouse, blank means unchanged — pick the right Purpose for the job, and reconcile in the current period where you can. Get those right and your opening balances and count adjustments land cleanly, with the ledger and the books in step.
Go-live opening stock or a messy count you don't trust?
We set opening stock correctly for go-lives, reconcile drifted counts, and put a monthly stock-take process in place so your inventory stays trustworthy.