FIFO Calculator: Calculate Ending Inventory & COGS


FIFO Inventory & COGS Calculator

Calculate FIFO Values

Enter your inventory purchases and the total number of units sold to calculate the Cost of Goods Sold (COGS) and the value of the ending inventory using the First-In, First-Out (FIFO) method.


Add each batch of inventory you purchased. The first batch entered is assumed to be the first one purchased.




Error message here


In-Depth Guide: Example of Using FIFO to Calculate Ending Inventory and COGS

The First-In, First-Out (FIFO) method is a cornerstone of inventory management and accounting. It operates on a simple, logical assumption: the first inventory items purchased are the first ones to be sold. This article provides a detailed example of using FIFO to calculate ending inventory and COGS, explains the underlying principles, and offers practical insights for businesses. Understanding this method is crucial for accurate financial reporting and making informed decisions about pricing and stock management.

What is the FIFO Method?

FIFO is an inventory costing method that assumes the earliest goods purchased are the first goods sold. As items are sold, their cost is assigned to the Cost of Goods Sold (COGS) in the same order they were purchased. The remaining items in inventory are therefore valued at the most recent costs. This method closely mirrors the actual physical flow of goods for many businesses, especially those dealing with perishable items (like groceries) or products with a limited shelf life (like electronics with fast-changing models). The primary goal of using an example of using fifo to calculate ending inventory and cogs is to provide a clear valuation for both what has been sold and what remains in stock.

The FIFO Formula and Calculation Process

There isn’t a single “formula” for FIFO, but rather a step-by-step process. The calculation involves tracking inventory in layers, or batches, based on purchase date and cost. To find your COGS and Ending Inventory, you follow these logical steps:

  1. List All Inventory Purchases: Document each purchase batch, noting the number of units and the cost per unit.
  2. Determine COGS: Starting with the oldest batch, match the units sold against the purchased units. Continue to the next oldest batch until all sold units are accounted for. Sum the costs of these sold units to get your total COGS.
  3. Determine Ending Inventory: The units that are left over represent your ending inventory. Their value is calculated using the cost of the most recently purchased batches.

FIFO Calculation Variables
Variable Meaning Unit Typical Range
Purchase Batch A specific group of inventory items bought at the same time for the same price. Units and Currency 1 to thousands of units
Units Sold The total quantity of items sold during the period. Units 1 to total units available
Cost of Goods Sold (COGS) The direct cost attributed to the production of the goods sold by a company. Currency ($) Depends on volume and cost
Ending Inventory The value of inventory on hand at the end of the accounting period. Currency ($) Depends on remaining units

For more detailed financial analysis, you might want to explore a Ratio Analysis Tool.

Practical Examples

Example 1: Basic Calculation

Imagine a business makes the following purchases in a month:

  • Purchase 1: 100 units @ $10/unit
  • Purchase 2: 150 units @ $12/unit

The business then sells 120 units. Here’s the FIFO calculation:

  • COGS Calculation:
    • Sell the first 100 units from Purchase 1: 100 units * $10 = $1,000
    • Sell the remaining 20 units from Purchase 2: 20 units * $12 = $240
    • Total COGS: $1,000 + $240 = $1,240
  • Ending Inventory Calculation:
    • You have 130 units left from Purchase 2 (150 – 20).
    • Ending Inventory Value: 130 units * $12 = $1,560

Example 2: Rising Prices

Let’s look at an example of using fifo to calculate ending inventory and cogs during a period of inflation:

  • Purchase 1 (Jan): 50 units @ $20/unit
  • Purchase 2 (Feb): 50 units @ $22/unit
  • Purchase 3 (Mar): 50 units @ $25/unit

The company sells 110 units.

  • COGS Calculation:
    • Sell all 50 units from Jan: 50 * $20 = $1,000
    • Sell all 50 units from Feb: 50 * $22 = $1,100
    • Sell 10 units from Mar: 10 * $25 = $250
    • Total COGS: $1,000 + $1,100 + $250 = $2,350
  • Ending Inventory Calculation:
    • 40 units remain from the March purchase (50 – 10).
    • Ending Inventory Value: 40 units * $25 = $1,000

As you can see, FIFO can have a big impact on your financial statements. To understand company performance, you might use a Growth Rate Calculator.

How to Use This FIFO Calculator

  1. Add Purchase Batches: Start by entering your first inventory purchase in the “Units Purchased” and “Cost per Unit” fields. Use the “+ Add Another Purchase Batch” button for each subsequent purchase. Ensure you enter them in chronological order.
  2. Enter Units Sold: In the “Total Units Sold” field, enter the total quantity of items sold during the period.
  3. Calculate: Click the “Calculate” button.
  4. Interpret the Results: The calculator will instantly display the total COGS, the total value of your Ending Inventory, and the number of units you have left. It also provides a detailed breakdown table showing exactly which batches contributed to the COGS and which remain in inventory.

Key Factors That Affect FIFO Calculations

  • Inflation/Deflation: During periods of rising prices (inflation), FIFO results in a lower COGS and a higher net income (and thus higher tax liability), because cheaper, older costs are matched against current revenues. The reverse is true in deflationary periods.
  • Supplier Price Changes: Frequent changes in the purchase price from suppliers will create more inventory layers, making manual tracking more complex but highlighting the importance of an automated tool.
  • Inventory Accuracy: The calculation is only as good as the data you provide. Inaccurate unit counts from physical inventory checks can lead to significant errors in valuation.
  • Product Spoilage or Obsolescence: If old inventory becomes unsellable, it must be written off and cannot be included in the COGS calculation through a normal sale, impacting profitability.
  • Sales Volume: High sales volume can quickly exhaust older, cheaper inventory layers, causing COGS to more closely reflect recent, higher costs.
  • Accounting System: The choice between FIFO, LIFO, or Weighted Average is an accounting policy decision. Companies must apply their chosen method consistently. For broader financial health, consider using a Working Capital Calculator.

Frequently Asked Questions (FAQ)

1. Why is FIFO a popular inventory method?
It’s popular because it’s logical, often matches the actual physical flow of goods, and is accepted by both GAAP and IFRS accounting standards. It’s also relatively simple to understand and apply.
2. How does FIFO affect taxes?
In an inflationary environment, FIFO results in a higher ending inventory value and a lower COGS. This leads to higher reported profits and, consequently, a higher income tax liability compared to LIFO.
3. What is the difference between FIFO and LIFO?
LIFO (Last-In, First-Out) is the opposite. It assumes the newest inventory is sold first. This example of using fifo to calculate ending inventory and cogs shows older costs going to COGS, while LIFO would expense the newest costs first.
4. Can a company switch between FIFO and LIFO?
Companies can change their inventory accounting method, but it’s not done frequently. Such a change requires a valid business reason, must be disclosed in the financial statements, and often requires retrospective adjustments.
5. Is FIFO suitable for all types of businesses?
It’s most suitable for businesses where maintaining a fresh stock is important, like food, pharmaceuticals, or fast-fashion. It may not accurately reflect the business model for industries like bulk material storage (e.g., coal), where the last items in are physically the first ones out. To manage business finances, a Cash Flow Calculator can be very helpful.
6. What happens if I sell more units than I have?
Our calculator will show an error. In a real-world scenario, this indicates a stockout and a data entry error, as you cannot sell inventory you do not possess.
7. Does this calculator handle returns?
This calculator is designed for a straightforward example of using fifo to calculate ending inventory and cogs and does not factor in sales returns. Returns would typically be added back to inventory at their original cost.
8. How do I handle beginning inventory?
To include beginning inventory, simply enter it as your first purchase batch. For example, if you start with 75 units valued at $9 each, your first entry in the calculator would be 75 units at a cost of $9.

Related Tools and Internal Resources

Further your financial knowledge with our suite of calculators. Each tool is designed to provide clarity on important business metrics.

  • LIFO Calculator: Compare the results from FIFO with the Last-In, First-Out method to see the impact on your financials.
  • Weighted Average Cost Calculator: Explore a third major inventory valuation method that smooths out price fluctuations.
  • {related_keywords}: A key metric for understanding profitability.
  • {related_keywords}: Learn how to manage your assets and liabilities effectively.
  • {related_keywords}: Essential for planning and ensuring your business has enough cash to operate.
  • {related_keywords}: Track your business’s expansion over time.

© 2026 Company Name. All Rights Reserved. For educational purposes only.



Leave a Reply

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