{"id":123,"date":"2015-05-29T09:38:05","date_gmt":"2015-05-29T07:38:05","guid":{"rendered":"http:\/\/wpcalc.com\/?p=123"},"modified":"2026-09-30T19:41:11","modified_gmt":"2026-09-30T16:41:11","slug":"fifo-inventory-cost","status":"publish","type":"post","link":"https:\/\/wpcalc.com\/en\/finance\/fifo-inventory-cost\/","title":{"rendered":"FIFO Inventory Cost Calculator"},"content":{"rendered":"<section class=\"not-prose calculator-box\" aria-labelledby=\"calculator-title\"><div class=\"flex items-baseline sm:items-center justify-between gap-2 sm:gap-3\"><div class=\"flex flex-col sm:flex-row sm:items-center gap-2\"><span class=\"icon icon-calculator text-primary-700! text-base! dark:text-primary-300!\" aria-hidden=\"true\"><\/span><h2 id=\"calculator-title\" class=\"text-lg font-display font-bold\">FIFO Inventory Valuation Tool<\/h2><\/div><div class=\"calcdash-favorite group\">\n  <button type=\"button\" class=\"favorite\" id=\"favorite\" data-favorite-id=\"123\" data-favorite-title=\"FIFO Inventory Cost\" data-favorite-url=\"https:\/\/wpcalc.com\/en\/finance\/fifo-inventory-cost\/\" data-favorite-excerpt=\"Calculate the cost of your ending inventory using the FIFO method. Enter the units remaining in stock and the units and cost per unit of up to three purchase batches.\" aria-label=\"Add to Favorites\" data-favorite-icon=\"icon icon-inventory\">\n    <span class=\"icon icon-shape-star-empty\" aria-hidden=\"true\"><\/span>\n  <\/button>\n  <div class=\"calcdash-favorite__tip\" aria-hidden=\"true\">\n   <span class=\"favorite-tooltip\" id=\"favorite-tooltip\"><\/span>\n  <\/div>\n  <span class=\"sr-only\" role=\"status\" id=\"favorite-status\"><\/span>\n<\/div><\/div><form action=\"https:\/\/wpcalc.com\/en\/finance\/fifo-inventory-cost\/\" method=\"POST\" class=\"calculator\" id=\"calculator-123\" data-post=\"123\"><fieldset class=\"fieldset-input\"><legend class=\"sr-only\">Input Fields<\/legend><div class=\"field is-single has-term\" id=\"input-1\"><label for=\"field-1\">Units in ending inventory<\/label><div class=\"term\">EI<\/div>  <div class=\"absolute bottom-0 left-16 top-8 w-2 h-0.5 bg-blue-500\"><\/div><input type=\"text\" name=\"units_in_ending_inventory\" id=\"field-1\" aria-describedby=\"calc-info-1\" data-number inputmode=\"decimal\" autocomplete=\"off\" spellcheck=\"false\" min=\"0\" value=\"150\"\/><small id=\"calc-info-1\">Number of units remaining at the end of the period<\/small><\/div><div class=\"field has-term\" id=\"input-2\"><label for=\"field-2\">Purchase Batch 1 (units)<\/label><div class=\"term\">U1<\/div>  <div class=\"absolute bottom-0 left-16 top-8 w-2 h-0.5 bg-blue-500\"><\/div><input type=\"text\" name=\"purchase_batch_1_units\" id=\"field-2\" aria-describedby=\"calc-info-2\" data-number inputmode=\"decimal\" autocomplete=\"off\" spellcheck=\"false\" min=\"0\" value=\"100\"\/><small id=\"calc-info-2\">Units purchased in the first batch<\/small><\/div><div class=\"field has-term\" id=\"input-3\"><label for=\"field-3\">Purchase Batch 1 (cost per unit)<\/label><div class=\"term\">C1<\/div>  <div class=\"absolute bottom-0 left-16 top-8 w-2 h-0.5 bg-blue-500\"><\/div><input type=\"text\" name=\"purchase_batch_1_cost_per_unit\" id=\"field-3\" aria-describedby=\"calc-unit-3\" data-number inputmode=\"decimal\" autocomplete=\"off\" spellcheck=\"false\" min=\"0\" value=\"10\"\/><div class=\"unit\" id=\"calc-unit-3\">$<\/div><\/div><div class=\"field has-term\" id=\"input-4\"><label for=\"field-4\">Purchase Batch 2 (units)<\/label><div class=\"term\">U2<\/div>  <div class=\"absolute bottom-0 left-16 top-8 w-2 h-0.5 bg-blue-500\"><\/div><input type=\"text\" name=\"purchase_batch_2_units\" id=\"field-4\" data-number inputmode=\"decimal\" autocomplete=\"off\" spellcheck=\"false\" min=\"0\" value=\"150\"\/><\/div><div class=\"field has-term\" id=\"input-5\"><label for=\"field-5\">Purchase Batch 2 (cost per unit)<\/label><div class=\"term\">C2<\/div>  <div class=\"absolute bottom-0 left-16 top-8 w-2 h-0.5 bg-blue-500\"><\/div><input type=\"text\" name=\"purchase_batch_2_cost_per_unit\" id=\"field-5\" aria-describedby=\"calc-unit-5\" data-number inputmode=\"decimal\" autocomplete=\"off\" spellcheck=\"false\" min=\"0\" value=\"12\"\/><div class=\"unit\" id=\"calc-unit-5\">$<\/div><\/div><div class=\"field has-term\" id=\"input-6\"><label for=\"field-6\">Purchase Batch 3 (units)<\/label><div class=\"term\">U3<\/div>  <div class=\"absolute bottom-0 left-16 top-8 w-2 h-0.5 bg-blue-500\"><\/div><input type=\"text\" name=\"purchase_batch_3_units\" id=\"field-6\" data-number inputmode=\"decimal\" autocomplete=\"off\" spellcheck=\"false\" min=\"0\" value=\"200\"\/><\/div><div class=\"field has-term\" id=\"input-7\"><label for=\"field-7\">Purchase Batch 3 (cost per unit)<\/label><div class=\"term\">C3<\/div>  <div class=\"absolute bottom-0 left-16 top-8 w-2 h-0.5 bg-blue-500\"><\/div><input type=\"text\" name=\"purchase_batch_3_cost_per_unit\" id=\"field-7\" aria-describedby=\"calc-unit-7\" data-number inputmode=\"decimal\" autocomplete=\"off\" spellcheck=\"false\" min=\"0\" value=\"14\"\/><div class=\"unit\" id=\"calc-unit-7\">$<\/div><\/div><\/fieldset><div class=\"buttons\"><button type=\"submit\" data-text=\"Re-Calculate\" id=\"calculate-button\" data-post=\"123\">Calculate<\/button><button type=\"reset\">Reset<\/button><\/div><div class=\"field is-checkbox hidden!\" id=\"field-auto-calc\"><input type=\"checkbox\" id=\"auto-calc\"><label for=\"auto-calc\">Calculate automatically<\/label><small>If enabled, the result will update automatically when you change any value.<\/small><\/div><div class=\"fieldset-result is-hidden\" aria-labelledby=\"result-title\" aria-live=\"polite\" role=\"region\"> <h3 class=\"result-title bg-gradient-to-r from-primary-50 to-gray-50 dark:from-primary-900 dark:to-gray-800\" id=\"result-title\"><span class=\"icon icon-s-pulse\" aria-hidden=\"true\"><\/span> Your Results<\/h3><div class=\"result-box\"><div class=\"field-result\" id=\"output-1\"><span class=\"field-title\"><span>FIFO Ending Inventory Cost<\/span><\/span><span class=\"field-value\" id=\"result-1\" data-unit=\"$\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><\/div><div class=\"result-actions\"><button type=\"button\" class=\"copy-link\"><svg viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z\"\/><path d=\"M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z\"\/><\/svg><span class=\"copy-link__text\">Copy link to this calculation<\/span><\/button><span class=\"sr-only\" role=\"status\" id=\"copy-link-status\"><\/span><\/div><\/div><a href=\"#respond\" class=\"hidden transition-opacity duration-300 opacity-0 w-50 text-sm justify-center items-center gap-2 px-4 py-2 rounded bg-gray-200 text-gray-700 hover:bg-gray-300\" id=\"leave-comment\"><span class=\"icon icon-comments\" aria-hidden=\"true\"><\/span>Leave a Comment<\/a><\/form><\/section><section id=\"calc-reactions\" class=\"not-prose hidden my-12 bg-gradient-to-r from-primary-50 to-gray-50 border border-indigo-100 rounded-xl px-6 py-4 shadow-sm\" data-post=\"123\" aria-live=\"polite\" aria-labelledby=\"calc-reactions-title\"><p id=\"calc-reactions-title\" class=\"text-sm text-gray-500 text-center mb-2\">How did this result make you feel?<\/p><div role=\"group\" aria-labelledby=\"calc-reactions-title\" class=\"grid grid-cols-3 sm:flex sm:flex-row sm:justify-around gap-4 sm:items-center sm:flex-wrap\"><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"like\"><span class=\"reaction-count\" data-reaction-count=\"like\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude00 <\/span><span class=\"reaction-description font-medium\">Like <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"helpful\"><span class=\"reaction-count\" data-reaction-count=\"helpful\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\udca1 <\/span><span class=\"reaction-description font-medium\">Helpful <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"confused\"><span class=\"reaction-count\" data-reaction-count=\"confused\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude15 <\/span><span class=\"reaction-description font-medium\">Confused <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"disappointed\"><span class=\"reaction-count\" data-reaction-count=\"disappointed\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude1e <\/span><span class=\"reaction-description font-medium\">Disappointed <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"inaccurate\"><span class=\"reaction-count\" data-reaction-count=\"inaccurate\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\u274c <\/span><span class=\"reaction-description font-medium\">Inaccurate <\/span><\/button><\/div><div id=\"reaction-message\" class=\"hidden mt-8 rounded-md border border-primary-100 bg-white\/50 backdrop-blur-sm px-4 py-2 text-sm text-center shadow-sm\"><\/div><\/section><div class=\"calcdash-ad not-prose calcdash-ad--calc_result calcdash-ad--in-article\"><ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-1721569815777345\" data-ad-slot=\"6317458308\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\"><\/ins><script>(adsbygoogle = window.adsbygoogle || []).push({});<\/script><\/div>\n<style id=\"wpcoderpro-inline-1\">.formula-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section class=\"formula-box\" aria-labelledby=\"formula-title\">\r\n\t<div id=\"formula-title\" class=\"not-prose font-display mb-4\"><span class=\"icon icon-formula\" aria-hidden=\"true\"><\/span><h2>FIFO Ending Inventory Cost Formula<\/h2><\/div>\r\n\t<figure class=\"not-prose formula\">\r\n\t\t<figcaption class=\"formula-title\">Formula<\/figcaption>\r\n\t\t<div class=\"text-base text-gray-800\" id=\"formula\">\n\\[ \\text{Ending Inventory Cost}_{\\text{FIFO}} = \\sum_{\\text{newest} \\to \\text{oldest}} \\left( U_i \\times C_i \\right) \\]\n<\/div>\r\n\t<\/figure>\r\n\t<\/p>\n<p><strong>Where:<\/strong><\/p>\n<ul>\n<li>\\(U_i\\) \u2014 units taken from batch \\(i\\) to fill the ending inventory, starting with the most recent purchase<\/li>\n<li>\\(C_i\\) \u2014 cost per unit of batch \\(i\\)<\/li>\n<li>\\(EI\\) \u2014 total units in ending inventory; the sum of all \\(U_i\\) equals \\(EI\\)<\/li>\n<\/ul>\n<p>Under FIFO (First-In, First-Out), the oldest units are assumed to be sold first, so the stock left over at the end of the period consists of the newest purchases. The formula works backward through the purchase batches \u2014 newest first \u2014 taking units from each batch until the ending inventory quantity is fully filled.<\/p>\n<p>If you also need the cost of goods sold, subtract the result from the total cost of all purchases:<\/p>\n<p>\\[ \\text{COGS} = \\text{Total Cost of Purchases} - \\text{Ending Inventory Cost} \\]<br \/>\r\n<\/section>\n<style id=\"wpcoderpro-inline-459\">.calculation-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section id=\"calculation\" class=\"calculation-box\" aria-labelledby=\"calculation-title\">\r\n\t<div id=\"calculation-title\" class=\"not-prose font-display\"><span class=\"icon icon-unordered-list\" aria-hidden=\"true\"><\/span><h2>FIFO Ending Inventory Cost \u2013 Calculation Example<\/h2><\/div>\r\n\r\n<\/p>\n<p><strong>Example:<\/strong> at the end of the period you have 150 units left in stock. During the period you made three purchases: Batch 1 \u2014 100 units at \\($10\\) per unit, Batch 2 \u2014 150 units at \\($12\\) per unit, and Batch 3 \u2014 200 units at \\($14\\) per unit.<\/p>\n<p>Under FIFO the newest units remain in stock, so all 150 ending units come from Batch 3 (the latest purchase, with 200 units available):<\/p>\n<p>\\[ 150 \\times \\$14 = \\$2{,}100 \\]<\/p>\n<p><strong>Result:<\/strong> the FIFO ending inventory cost is <strong>\\($2,100\\)<\/strong>. The total cost of purchases was \\(100 \\times 10 + 150 \\times 12 + 200 \\times 14 = \\$5{,}700\\), so the cost of goods sold for the period is \\(5{,}700 - 2{,}100 = \\$3{,}600\\).<\/p>\n<p>\n\r\n<\/section>\n<h2>How to Use the Calculator<\/h2>\n<ol>\n<li>Enter the <strong>Units in ending inventory<\/strong> \u2014 the number of units you still have in stock at the end of the period.<\/li>\n<li>Enter the units and cost per unit for <strong>Purchase Batch 1<\/strong> \u2014 this must be your <em>oldest<\/em> purchase.<\/li>\n<li>Enter the units and cost per unit for <strong>Purchase Batch 2<\/strong> and <strong>Purchase Batch 3<\/strong>, in chronological order, so that Batch 3 is the most recent purchase.<\/li>\n<li>If you made fewer than three purchases, simply leave the unused batch fields at 0.<\/li>\n<li>Read the <strong>FIFO Ending Inventory Cost<\/strong> in dollars at the bottom of the calculator.<\/li>\n<\/ol>\n<h2>What Is FIFO Inventory Costing?<\/h2>\n<p>FIFO (First-In, First-Out) is one of the most widely used inventory valuation methods in accounting. It assumes that the oldest goods purchased are the first ones sold, which matches how most businesses physically move their stock \u2014 grocery stores rotate products so older items leave the shelf first, and manufacturers consume raw materials in the order they arrive. Because of this natural fit, FIFO is accepted under both IFRS and US GAAP, while the alternative LIFO method is only permitted in the United States.<\/p>\n<p>The practical effect of FIFO shows up most clearly when prices are changing. In an inflationary environment, the units sold are the cheaper, older ones, so COGS is lower and reported profit is higher; meanwhile the ending inventory on the balance sheet is valued at the newer, higher prices, which better reflects the current replacement cost of the stock. This is why the result from this calculator is often close to what you would actually pay to repurchase the same inventory today.<\/p>\n<p>To interpret the number correctly, remember what it represents: the cost of the units you <em>still own<\/em>, not the units you sold. If you subtract it from the total cost of all purchases made in the period, you get FIFO COGS. From there you can feed the figure into your <a href=\"https:\/\/wpcalc.com\/en\/finance\/ending-inventory\/\">ending inventory<\/a> or <a href=\"https:\/\/wpcalc.com\/en\/cost-of-goods-sold\/\">cost of goods sold<\/a> calculations, compare it against <a href=\"https:\/\/wpcalc.com\/en\/finance\/beginning-inventory\/\">beginning inventory<\/a> from the prior period, or use it to monitor how quickly stock turns over with the <a href=\"https:\/\/wpcalc.com\/en\/finance\/days-in-inventory\/\">days in inventory<\/a> metric.<\/p>\n<h2>How the Allocation Works: A Larger Example<\/h2>\n<p>When ending inventory is larger than the newest batch, the calculator spills over into earlier batches. Suppose you have 350 units left instead of 150, with the same purchases as the example above:<\/p>\n<table>\n<thead>\n<tr>\n<th>Batch<\/th>\n<th>Units purchased<\/th>\n<th>Cost per unit<\/th>\n<th>Units in ending inventory<\/th>\n<th>Cost allocated<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>3 (newest)<\/td>\n<td>200<\/td>\n<td>$14<\/td>\n<td>200<\/td>\n<td>$2,800<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>150<\/td>\n<td>$12<\/td>\n<td>150<\/td>\n<td>$1,800<\/td>\n<\/tr>\n<tr>\n<td>1 (oldest)<\/td>\n<td>100<\/td>\n<td>$10<\/td>\n<td>0<\/td>\n<td>$0<\/td>\n<\/tr>\n<tr>\n<td><strong>Total<\/strong><\/td>\n<td>450<\/td>\n<td>\u2014<\/td>\n<td><strong>350<\/strong><\/td>\n<td><strong>$4,600<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>All 200 units of Batch 3 go into ending inventory first, followed by 150 units of Batch 2. The 100 oldest units at $10 were fully sold, so none of them remain in stock.<\/p>\n<h2>Assumptions and Limitations<\/h2>\n<ul>\n<li><strong>No beginning inventory:<\/strong> the calculator values ending inventory using only the three purchase batches you enter. If you started the period with stock on hand, treat that opening stock as an additional batch (with its own cost) and enter it in the earliest position, or use the <a href=\"https:\/\/wpcalc.com\/en\/finance\/inventory-stock\/\">inventory stock<\/a> calculator to plan purchases first.<\/li>\n<li><strong>Maximum of three batches:<\/strong> if you purchased at more than three different prices during the period, combine the oldest batches into a single weighted entry, or run the calculation in stages across sub-periods.<\/li>\n<li><strong>Periodic inventory system:<\/strong> the calculation matches a periodic system, where counts are taken at the end of the period. A perpetual system tracks each sale as it happens, which can give slightly different figures when purchases and sales are interleaved.<\/li>\n<li><strong>Cost flow assumption only:<\/strong> FIFO describes the flow of <em>costs<\/em>, not necessarily the physical movement of every unit. The assumption that older stock sells first is an accounting convention \u2014 although for most perishable or rotating goods it matches reality closely.<\/li>\n<li><strong>Tax implications:<\/strong> during inflation FIFO produces higher taxable income than LIFO because COGS is lower. Consider the effect on both your <a href=\"https:\/\/wpcalc.com\/en\/finance\/break-even\/\">break-even<\/a> point and your tax documentation before choosing a costing method for reporting.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Calculate the cost of your ending inventory using the FIFO method. Enter the units remaining in stock and the units and cost per unit of up to three purchase batches.<\/p>\n","protected":false},"author":70,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[5],"tags":[26],"class_list":["post-123","post","type-post","status-publish","format-standard","hentry","category-finance","tag-inventory"],"acf":[],"_links":{"self":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/users\/70"}],"replies":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/comments?post=123"}],"version-history":[{"count":2,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/123\/revisions"}],"predecessor-version":[{"id":66100,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/123\/revisions\/66100"}],"wp:attachment":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/media?parent=123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/categories?post=123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/tags?post=123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}