To calculate the average cost per unit, divide your total production costs for a period by the number of units you produced in that same period. Spend $500,000 making 10,000 items and each one carries a cost of $50. The number matters because it sets the value of every unit sitting in inventory and the cost of goods sold that hits your income statement the moment those units ship.
The Formula
Average cost per unit = total production costs รท total units produced.
Total production costs are every dollar spent turning raw materials into finished goods during the period. Total units produced is the count of finished goods that came off the line in that same window. Most businesses run the calculation at month-end or year-end, after all transactions for the period have been recorded but before the books close.
The result is the value assigned to each finished unit. While the unit sits in inventory, that cost is an asset on the balance sheet. When the unit sells, the same figure moves to the income statement as cost of goods sold and drives the gross profit you report.
What Belongs in Total Production Costs
Three cost categories make up the numerator, and leaving any of them out will pull your per-unit figure below the truth:
- Direct materials. The raw inputs physically incorporated into the product. Lumber and hardware for a furniture maker. Ingredients for a food producer.
- Direct labor. Wages paid to workers who actually build or assemble the product. Office staff and management salaries are not included; only production-floor labor.
- Manufacturing overhead. Everything else tied to the production environment. Variable overhead covers factory utilities and machine maintenance. Fixed overhead covers building rent, insurance, and equipment depreciation.
Under Generally Accepted Accounting Principles, all three categories have to be included when valuing inventory. Overhead cannot be left out on the grounds that it is harder to allocate.
The Extra Costs UNICAP Adds for Taxes
Federal tax law reaches further than GAAP. Internal Revenue Code Section 263A, known as the uniform capitalization or UNICAP rules, requires businesses to capitalize certain indirect costs into inventory instead of deducting them as current expenses.1Office of the Law Revision Counsel. 26 USC 263A – Capitalization and Inclusion in Inventory Costs of Certain Expenses Costs like purchasing, warehousing, and handling get folded into the per-unit figure for tax reporting even though a manager would not normally call them production costs.2eCFR. 26 CFR 1.263A-1 Uniform Capitalization of Costs
The practical consequence is that your tax per-unit cost can be higher than the figure in your internal management reports, because the IRS wants a broader pool of overhead captured in inventory. Confirm your cost sheets reflect the full UNICAP allocation before you finalize the number.
Smaller businesses are exempt. If your average annual gross receipts over the prior three tax years are at or below the inflation-adjusted threshold under Section 448(c), you can skip UNICAP. For tax years beginning in 2025, that threshold is $31 million.3Internal Revenue Service. Rev. Proc. 2025-28 The IRS adjusts the figure each year, so check the current revenue procedure for the year you are filing.
Counting the Units
The denominator deserves the same care as the numerator. You need an accurate count of finished goods completed during the period, pulled from production logs and confirmed by physical inventory counts. Most per-unit cost errors start with discrepancies between records and actual output.
Equivalent Units for Work in Progress
Not every item on the factory floor is finished at period-end. Equivalent units express partially completed goods as a fraction of a finished unit. If 1,000 units are 40% complete, that counts as 400 equivalent units, and you add those 400 to your finished-goods count to build the denominator.
This matters most in continuous production settings such as chemical plants, oil refineries, and food processing, where you rarely have neat batches of fully complete goods at month-end. Without equivalent units, you undercount production and overstate the cost of each unit.
Weighted Average When Costs Shift
The plain formula works when every unit costs the same to make. In reality, raw material prices move, labor rates change, and older inventory mixes with newer purchases. The weighted average cost method blends everything together.
Add the cost of beginning inventory to all production or purchase costs during the period. Divide that combined total by the sum of units in beginning inventory plus units produced or purchased. The result is a single weighted average cost applied to every unit available for sale, regardless of when it was actually made or what its inputs cost at the time.
The method removes the need to track which specific unit sold at which specific cost and smooths out price swings so cost of goods sold does not spike because one batch of raw materials happened to be expensive. Federal tax law permits weighted average as long as the resulting inventory valuation clearly reflects income and aligns with standard industry practice.4Office of the Law Revision Counsel. 26 USC 471
Periodic Versus Perpetual
Under a periodic system, you calculate the weighted average once, at the end of the accounting period. Total cost of all goods available divided by total units available. Simple, but there is no real-time cost figure between periods.
Under a perpetual system, often called the moving average cost method, you recalculate every time a new purchase or production batch enters inventory. Each new batch changes the average, and the next sale uses the updated blended figure. Perpetual systems keep the number current but require inventory software that can maintain the running calculation.
The choice affects reported cost of goods sold. When prices are rising, a perpetual moving average produces results that differ from a single period-end calculation, because each sale during the period uses the average as of that transaction date rather than a single end-of-period figure.
Weighted Average Is Not the Only Method
Weighted average is one of several permissible approaches. FIFO assumes the oldest inventory sells first; LIFO assumes the newest sells first. Each produces different cost of goods sold and ending inventory figures, and in periods of rising prices the spread between them can be meaningful. LIFO is allowed under U.S. GAAP but prohibited under international standards. If you are choosing a method for the first time or considering a switch, the choice belongs in a separate analysis; the calculation described here is specific to weighted average.
When Cost Is Higher Than the Inventory Is Worth
Calculating the average cost is only the starting point for valuation. Under GAAP, you then compare that cost to net realizable value, which is estimated selling price minus the costs to complete and sell. You report inventory at whichever figure is lower. The rule keeps the balance sheet from overstating assets when market conditions have made your inventory worth less than it cost to produce.
The IRS applies a related concept. Damaged, obsolete, or otherwise subnormal goods cannot stay on the books at their original average cost. Finished goods in that category must be valued at the actual selling price you can get, minus the cost of selling them, and you have to show that you offered them at that price within 30 days after the inventory date. Raw materials and partially finished subnormal goods are valued based on their actual condition and usability, but never below scrap value. Completely unsalable goods must be removed from inventory entirely.5IRS.gov. Lower of Cost or Market (LCM)
A blended $50 per-unit cost tells you nothing useful about a pallet of water-damaged goods you can only sell for $15. The writedown has to happen, and the burden of proving the goods qualify as subnormal falls on you.
Where the Number Lands on Your Tax Return
Businesses report their inventory valuation method and cost of goods sold on Form 1125-A, which attaches to the entity’s income tax return (Form 1120 for corporations, Form 1065 for partnerships).6Internal Revenue Service. Form 1125-A – Cost of Goods Sold Line 9a asks you to check which valuation method you use: cost, lower of cost or market, or another approach. The form then walks the standard calculation of beginning inventory, plus purchases and labor, plus Section 263A costs, minus ending inventory, to arrive at cost of goods sold.
Switching from one valuation method to another is not something you can do quietly. The IRS requires Form 3115, Application for Change in Accounting Method. Changes between permissible inventory methods typically qualify as an automatic change under designated change number 137, which means no advance approval and no user fee, but the form still has to be filed with the tax return for the year of the change.7Internal Revenue Service. Instructions for Form 3115 Skip the form and the IRS can reject your entire inventory valuation for that year.
Keep the production cost sheets, inventory logs, and purchase records that support the calculation. The general audit window is three years from the filing date, but it extends to six years if you underreport income by more than 25% of gross income, and the IRS advises keeping property-related records, which includes inventory, until the limitations period expires for the year you dispose of the property.8Internal Revenue Service. How Long Should I Keep Records Most accountants hold inventory records for at least six years.