Calculate the Cost of Goods Sold (COGS) Using FIFO – Expert Calculator


Calculate the Cost of Goods Sold Using FIFO

FIFO COGS Calculator

Enter your purchase batches and units sold to calculate the Cost of Goods Sold (COGS) using the First-In, First-Out (FIFO) method, along with ending inventory values.

Purchase Batches



Date of the purchase (optional, for reference).


Number of units acquired in this batch.


Cost for each unit in this batch.



Date of the purchase (optional, for reference).


Number of units acquired in this batch.


Cost for each unit in this batch.



Total number of units sold during the period.

Calculation Results

$0.00
Total Goods Available for Sale: $0.00
Ending Inventory Quantity: 0 Units
Ending Inventory Value: $0.00

COGS is calculated by assuming the first units purchased are the first ones sold. Ending inventory is valued based on the most recently purchased units.


Inventory Purchase Batches
Purchase Date Quantity (Units) Cost Per Unit ($) Total Cost ($)

Inventory Depletion Chart

What is the Cost of Goods Sold (COGS) Using FIFO?

The Cost of Goods Sold (COGS) represents the direct costs attributable to the production of the goods sold by a company. This amount includes the cost of the materials used to create the good along with the direct labor costs used to produce the good. When it comes to inventory management, determining which costs apply to which goods can be complex, especially when purchase prices fluctuate. This is where inventory costing methods like FIFO come into play.

FIFO, or First-In, First-Out, is an inventory valuation method that assumes the first goods purchased or manufactured are the first ones sold. In other words, the oldest inventory is sold first. This method aligns with the natural flow of many businesses, especially those dealing with perishable goods or products with expiry dates. The FIFO method impacts a company’s financial statements by influencing the COGS and the value of ending inventory.

Who Should Use the FIFO Method?

  • Businesses with Perishable Goods: Groceries, florists, and other businesses selling items with a limited shelf life naturally use FIFO to minimize spoilage and waste.
  • Businesses with Rapidly Changing Inventory: Companies selling electronics or fashion items often find FIFO suitable because older models or styles are typically sold before newer ones.
  • Companies in Rising Price Environments: During periods of inflation, FIFO generally results in a lower COGS and a higher net income because the older, lower-cost inventory is expensed first. This can lead to higher taxes, but also presents a more realistic picture of the company’s current inventory value.

Common Misunderstandings about FIFO COGS

A frequent misconception is that FIFO necessarily means the physical flow of goods matches the cost flow. While often true, it’s not a strict requirement for the accounting method. FIFO is an assumption about how costs are assigned. Another misunderstanding relates to its impact on profitability and taxes. While FIFO can result in higher reported profits during inflation, it might also lead to higher tax liabilities because of that increased profit. Conversely, in a deflationary environment, FIFO would lead to higher COGS and lower reported profits.

Cost of Goods Sold (COGS) Using FIFO Formula and Explanation

The core principle of FIFO is to match the oldest costs with the revenues generated from the sale of goods. To calculate COGS using FIFO, you essentially track your inventory in layers, based on purchase dates and costs.

The Formula Steps:

  1. Identify total units sold: Determine the total quantity of items sold during the accounting period.
  2. Match oldest costs: Start with the earliest available inventory batch. Assign the cost of these units to the units sold until that batch is depleted or all units sold are accounted for.
  3. Proceed to next oldest batch: If more units were sold than available in the first batch, move to the next oldest batch and repeat the process.
  4. Sum the costs: Add up all the costs assigned to the units sold from each batch. This sum represents your FIFO COGS.

The formula can be conceptualized as:

FIFO COGS = (Quantity from oldest batch sold × Cost per unit of oldest batch) + (Quantity from next oldest batch sold × Cost per unit of next oldest batch) + ...

Variables Table

Variable Meaning Unit Typical Range
Purchase Date The date on which an inventory batch was acquired. Date Any valid date
Quantity Purchased The number of units acquired in a specific purchase batch. Units (e.g., pieces, items) 0 to millions
Cost Per Unit The cost incurred for each individual unit within a purchase batch. Currency (e.g., $, £, €) $0.01 to thousands of dollars
Units Sold The total number of units sold during the accounting period. Units (e.g., pieces, items) 0 to millions
FIFO COGS The total direct costs of the goods sold, calculated using the FIFO method. Currency (e.g., $, £, €) $0 to billions of dollars
Ending Inventory Quantity The number of units remaining in inventory at the end of the period. Units (e.g., pieces, items) 0 to millions
Ending Inventory Value The monetary value of the remaining inventory, valued at the most recent purchase costs. Currency (e.g., $, £, €) $0 to billions of dollars

Practical Examples of Calculating FIFO COGS

Let’s illustrate the FIFO method with a couple of realistic scenarios.

Example 1: Simple FIFO Calculation

A small retailer has the following inventory purchases:

  • January 5: 100 units @ $10.00/unit
  • January 20: 150 units @ $12.00/unit

During the month, the retailer sells 200 units.

Calculation:

  1. The first 100 units sold are from the January 5 batch: 100 units * $10.00 = $1,000.00
  2. The remaining 100 units sold (200 – 100) are from the January 20 batch: 100 units * $12.00 = $1,200.00

FIFO COGS = $1,000.00 + $1,200.00 = $2,200.00

Ending Inventory: 50 units (150 – 100) remain from the January 20 batch @ $12.00/unit = $600.00.

Example 2: Multiple Sales and Purchases

Consider a company with these inventory movements:

  • Beginning Inventory: 50 units @ $8.00/unit
  • March 10: Purchase 200 units @ $9.00/unit
  • March 15: Sale of 180 units
  • March 20: Purchase 100 units @ $10.00/unit
  • March 25: Sale of 120 units

Calculation:

First Sale (180 units on March 15):

  • 50 units from Beginning Inventory @ $8.00 = $400.00
  • 130 units (180 – 50) from March 10 purchase @ $9.00 = $1,170.00
  • COGS for first sale = $400.00 + $1,170.00 = $1,570.00

Remaining inventory after first sale: 70 units (200 – 130) from March 10 purchase @ $9.00.

Second Sale (120 units on March 25):

  • 70 units from remaining March 10 purchase @ $9.00 = $630.00
  • 50 units (120 – 70) from March 20 purchase @ $10.00 = $500.00
  • COGS for second sale = $630.00 + $500.00 = $1,130.00

Total FIFO COGS = $1,570.00 + $1,130.00 = $2,700.00

Ending Inventory: 50 units (100 – 50) remain from March 20 purchase @ $10.00/unit = $500.00.

How to Use This FIFO COGS Calculator

This calculator is designed to be intuitive and help you quickly determine your Cost of Goods Sold using the FIFO method. Follow these simple steps:

  1. Enter Purchase Batches: Start by entering the quantity and cost per unit for each inventory purchase. The calculator provides default entries to get you started. For accuracy, it’s best to enter purchases in chronological order, although the calculator will internally sort them by date for FIFO.
  2. Add More Batches: If you have more than two purchase batches, click the “Add Purchase Batch” button to add additional input fields.
  3. Enter Units Sold: Input the total number of units that were sold during the period for which you want to calculate COGS.
  4. Calculate: Click the “Calculate FIFO COGS” button. The calculator will process your entries and display the results instantly.
  5. Interpret Results: The primary result, your FIFO COGS, will be prominently displayed. You’ll also see intermediate values like Total Goods Available for Sale, Ending Inventory Quantity, and Ending Inventory Value.
  6. Review Table and Chart: The “Inventory Purchase Batches” table provides a clear summary of your inputs. The “Inventory Depletion Chart” visually represents how the oldest inventory layers are consumed first.
  7. Reset: If you wish to start over, click the “Reset” button to clear all inputs and results.
  8. Copy Results: Use the “Copy Results” button to easily copy the calculated values for your records or other applications.

Key Factors That Affect Calculate the Cost of Goods Sold Using FIFO

Several factors can significantly influence the calculation and implications of COGS when using the FIFO method:

  • Inflationary vs. Deflationary Environment:
    • Inflation (rising prices): FIFO leads to a lower COGS (because older, cheaper units are expensed) and a higher net income and ending inventory value.
    • Deflation (falling prices): FIFO leads to a higher COGS (because older, more expensive units are expensed) and a lower net income and ending inventory value.
  • Purchase Price Fluctuations: The more volatile your unit purchase prices are, the greater the difference FIFO will show compared to other methods like LIFO (Last-In, First-Out) or Weighted-Average.
  • Inventory Turnover Rate: Businesses with high inventory turnover (meaning goods are sold quickly) will see less difference between FIFO and other methods, as inventory doesn’t sit long enough for significant cost changes to occur.
  • Sales Volume: A higher volume of sales directly increases COGS, as more units are moved from inventory to the income statement.
  • Purchase Volume and Frequency: Frequent, smaller purchases can create many inventory layers, potentially complicating manual FIFO calculations but handled efficiently by this calculator. Large, infrequent purchases create fewer, larger layers.
  • Discounts and Rebates: Any discounts or rebates on purchases directly reduce the cost per unit, which in turn affects the COGS calculation.
  • Freight-In Costs: Shipping and handling costs incurred to bring inventory to the seller’s location are considered part of the inventory cost. These “freight-in” costs increase the cost per unit and thus COGS.
  • Spoilage or Obsolescence: If inventory spoils or becomes obsolete, those costs must be written down, affecting the available inventory for COGS calculation and potentially leading to losses.

Frequently Asked Questions (FAQ) about FIFO COGS Calculation

Q: What is the main difference between FIFO and LIFO?
A: FIFO (First-In, First-Out) assumes the oldest inventory is sold first, while LIFO (Last-In, First-Out) assumes the newest inventory is sold first. FIFO matches older costs with revenue, while LIFO matches newer costs.
Q: Why does FIFO typically result in higher profits during inflation?
A: During inflation, prices are rising. FIFO assumes you sell the older, lower-cost inventory first. This means your Cost of Goods Sold will be lower, leading to a higher gross profit and net income.
Q: Is FIFO allowed under IFRS and GAAP?
A: Yes, FIFO is permitted under both International Financial Reporting Standards (IFRS) and Generally Accepted Accounting Principles (GAAP). However, LIFO is prohibited under IFRS.
Q: How does the FIFO method affect my balance sheet?
A: FIFO generally results in an ending inventory balance that more closely reflects current market values on the balance sheet, especially during periods of inflation, because the most recent (and higher) costs remain in inventory.
Q: What happens if I enter a non-numeric value for quantity or cost?
A: The calculator is designed to validate inputs. If you enter a non-numeric value or a negative number where it shouldn’t be, an error message will appear, and the calculation will not proceed until valid numbers are provided.
Q: Can I use this calculator for services instead of goods?
A: This calculator is specifically designed for the Cost of Goods Sold, which applies to tangible products. Services typically do not have a “cost of goods” in the same way, and their cost accounting would differ.
Q: How does this calculator handle partial sales from an inventory batch?
A: The calculator precisely tracks partial depletion. If you sell fewer units than are in the oldest batch, it will take those units from that batch and leave the remainder for future calculations, correctly moving to the next oldest batch only when necessary.
Q: What if my total units sold exceed my total units purchased?
A: The calculator will show an error if you attempt to sell more units than you have available in your total inventory, as this is an impossible scenario in real accounting. It will prompt you to adjust your units sold or add more inventory.

Related Tools and Internal Resources

Explore more resources to enhance your inventory management and financial understanding:

© 2026 Gemini Enterprise. All rights reserved.



Leave a Reply

Your email address will not be published. Required fields are marked *