Skip to content
ArumSoft Learning
KO
    Excel templateOperations

    FIFO Inventory Valuation and Lot Tracker for Excel

    First in, first out means two things in a warehouse: pick the oldest stock first, and value what is left at the cost of the newest receipts. Both need lot-level records. This workbook keeps every receipt as a lot with its own cost and expiry date and every issue in date order. Formulas work out how much of each lot has been used, cost each issue from the lots it actually drew on, and give you FIFO value, cost of goods issued, the next lot to pick, and stock that is expired, expiring or sitting too long.

    Sheets:
    7
    Works with:
    Excel for Microsoft 365, Excel 2016 or later, Excel for Mac and Excel for the web
    Updated:

    FIFO Inventory Lot Tracker.xlsx

    Excel workbook (.xlsx) · 153 KB · 7 sheets

    Download template

    Free to download. No sign-up needed.

    What you can do with it

    • Lot register: receipt date, quantity, unit cost and expiry, with units used and remaining under FIFO
    • FIFO cost of every issue, even when it spans two or three lots at different costs
    • Per item: on hand, FIFO value, average cost, cost of goods issued, next lot to pick, earliest expiry
    • Expired, expiring-soon and aged stock flagged, with an aging report by days in stock and days to expiry
    Start Here sheet of the FIFO inventory lot tracker Excel template showing the valuation date, expiry warning, aged-stock threshold, FIFO inventory value, cost of goods issued, lots on hand, expired, expiring and aged stock values, the oldest lot and a chart of value on hand by age
    The Start Here sheet with 12 sample food-service items, 94 lots and about 600 issues.

    What's inside

    The workbook has 7 sheets. You only type on a few of them; the rest calculate.

    SheetWhat it's forYou enterCalculated for you
    Start HereSettings and valuationValuation date, expiry warning days, aged-stock daysFIFO value, cost of goods issued, lots on hand, expired, expiring and aged value, oldest lot, issues larger than stock
    ItemsOne row per product (30)Item code, description, unitReceived, issued, on hand, FIFO value, average cost, cost of goods issued, next lot to pick, earliest expiry, status
    LotsReceipts in date order (300)Lot, item, received date, quantity, unit cost, expiryLot value, units before this lot, units used, remaining, remaining value, age, days to expiry, status, order check
    IssuesIssues in date order (600)Date, item, quantity, referenceUnits issued before, FIFO cost, unit cost, stock check
    AgingValue by age and by expiryBucket limitsLots and value per bucket
    ListsUnitsUnits of measureNothing
    ChecksSix data checksNothingOK or Review

    Before you start

    • Give each receipt a lot number (your PO and line, or the supplier's batch number).
    • Enter lots and issues in date order. The checks catch rows out of order.
    • Use landed cost per unit (price plus freight) if that is how you value inventory.

    Step-by-step guide

    1. Set the valuation date

      Start Here B6: usually a month end. Lots received and issues made after it are ignored in the valuation.

    2. List the items

      Items tab: code, description and unit. Everything else on the row calculates.

    3. Log receipts as lots

      Lots tab: lot number, item, received date, quantity, unit cost and expiry date, oldest first.

    4. Log issues

      Issues tab: date, item, quantity and a reference (order or work order). The FIFO cost appears beside each.

    5. Pick and rotate

      Items column J names the oldest lot that still has stock: pick from it. Column L and Lots column N flag expired and expiring stock.

    6. Close the month

      Start Here gives FIFO value and cost of goods issued; the Checks tab proves received value minus cost issued equals the value on hand.

    Formula map

    Every formula in the workbook, grouped by the sheet and column it lives in. A column of copied formulas counts once; the range it covers is shown.

    SheetCellsFunctionsWhat it computesReadsFeeds
    LotsH5 copied down to row 304IF, SUMIFUnits before this lotB5Units used and the FIFO cost of issues both measure against it.
    LotsI5 copied down to row 304IF, OR, MAX, MIN, SUMIFSUnits used from this lotD5, H5Remaining = quantity − used; remaining value = remaining × this lot's cost.
    LotsN5 copied down to row 304IF, ANDLot statusJ5, M5, L5Start Here sums remaining value by status.
    IssuesE5 copied down to row 604IF, SUMIFUnits issued beforeB5Combined with the lots' start and end positions to cost the issue.
    IssuesF5 copied down to row 604IF, SUMPRODUCT, ABSFIFO cost of the issueE5, C5Summed per item as cost of goods issued. An issue of 10 that takes 4 units at $32.00 and 6 at $33.10 costs $326.60.
    IssuesH5 copied down to row 604IF, SUMIFSStock checkE5, C5Counted on Start Here B19 and in the checks.
    ItemsJ5 copied down to row 34IF, IFERROR, INDEX, MATCHNext lot to pickA5The pick instruction for FIFO rotation.
    ItemsK5 copied down to row 34IF, OR, MINIFSEarliest expiry on handA5Drives the item status.
    AgingE5 copied down to row 9SUMIFSValue by age bucket—The Start Here chart; the total must equal FIFO value.

    Every formula, explained

    Each formula below is copied straight from the file, so what you read here is exactly what the cell contains. Click any cell in Excel to see it in the formula bar.

    Units before this lotLots!H5 · copied down to row 304
    =IF(A5="", 0, SUMIF($B$4:B4, B5, $D$4:D4))

    Adds the quantities of all earlier lots of the same item. That is where this lot starts in the item's FIFO queue.

    Piece by piece

    $B$4:B4
    Expanding range: every row above this one.
    SUMIF(…, B5, $D$4:D4)
    Quantity of earlier lots of this item.
    IF(A5="", 0, …)
    Zero for empty rows so other formulas can do arithmetic on it.

    With the sample data: B5 = BEAN-B → H5 result 0

    How it is used: Units used and the FIFO cost of issues both measure against it.

    How to change it: Nothing to change; keep lots in date order.

    Learn this: How to Use SUMIF and SUMIFS in Excel →
    Units used from this lotLots!I5 · copied down to row 304
    =IF(OR(A5="", C5>'Start Here'!$B$6),
        0, MAX(0, MIN(D5, SUMIFS(Issues!$C$5:$C$604, Issues!$B$5:$B$604, B5, Issues!$A$5:$A$604, "<="&'Start Here'!$B$6)-H5)))

    Total issued for the item up to the valuation date, minus what earlier lots could cover, limited to between 0 and this lot's quantity.

    Piece by piece

    SUMIFS(Issues!$C$5:$C$604, Issues!$B$5:$B$604, B5, Issues!$A$5:$A$604, "<="&'Start Here'!$B$6)
    Units issued for this item to date.
    -H5
    Less what earlier lots supplied.
    MIN(D5, …)
    Never more than the lot held.
    MAX(0, …)
    Never negative.
    C5>'Start Here'!$B$6
    Lots received after the date are untouched.

    With the sample data: D5 = 50, H5 = 0 → I5 result 50

    How it is used: Remaining = quantity − used; remaining value = remaining × this lot's cost.

    How to change it: Nothing to change.

    Learn this: How to Use MIN and MAX in Excel →
    Lot statusLots!N5 · copied down to row 304
    =IF(A5="", "", IF(C5>'Start Here'!$B$6,
        "Not yet received", IF(J5=0, "Used up", IF(AND(M5<>"", M5<0), "Expired", IF(AND(M5<>"", M5<='Start Here'!$B$7), "Expiring soon", IF(L5>'Start Here'!$B$8, "Aged", "In stock"))))))

    Checks in order: not yet received, used up, expired, expiring within the warning window, older than the aged-stock threshold, otherwise in stock.

    Piece by piece

    C5>'Start Here'!$B$6
    Received after the valuation date.
    J5=0
    Used up.
    M5<0
    Expired.
    M5<='Start Here'!$B$7
    Expiring soon.
    L5>'Start Here'!$B$8
    Aged.

    With the sample data: J5 = 0, M5 = —, L5 = — → N5 result Used up

    How it is used: Start Here sums remaining value by status.

    How to change it: Change the windows on Start Here.

    Learn this: How to Use the IF Function in Excel →
    Units issued beforeIssues!E5 · copied down to row 604
    =IF(A5="", "", SUMIF($B$4:B4, B5, $C$4:C4))

    Running total of earlier issues of the same item: where this issue starts in the FIFO queue.

    Piece by piece

    SUMIF($B$4:B4, B5, $C$4:C4)
    Earlier issues of this item.

    With the sample data: B5 = FLR-50 → E5 result 0

    How it is used: Combined with the lots' start and end positions to cost the issue.

    How to change it: Nothing to change; keep issues in date order.

    Learn this: How to Use SUMIF and SUMIFS in Excel →
    FIFO cost of the issueIssues!F5 · copied down to row 604
    =IF(A5="", "", SUMPRODUCT((Lots!$B$5:$B$304=B5)*(((((Lots!$H$5:$H$304+Lots!$D$5:$D$304)+(E5+C5)-ABS((Lots!$H$5:$H$304+Lots!$D$5:$D$304)-(E5+C5)))/2)-((Lots!$H$5:$H$304+E5+ABS(Lots!$H$5:$H$304-E5))/2))+ABS(((((Lots!$H$5:$H$304+Lots!$D$5:$D$304)+(E5+C5)-ABS((Lots!$H$5:$H$304+Lots!$D$5:$D$304)-(E5+C5)))/2)-((Lots!$H$5:$H$304+E5+ABS(Lots!$H$5:$H$304-E5))/2))))/2*Lots!$E$5:$E$304))

    Treats each lot as a stretch of units from its start (units before it) to its end (start + quantity), and this issue as the stretch from E5 to E5 + C5. The overlap with each lot, times that lot's cost, is added up.

    Piece by piece

    (Lots!$B$5:$B$304=B5)
    Only lots of this item.
    (a+b−ABS(a−b))/2
    The smaller of a and b, written so it works on whole columns: min(lot end, issue end).
    (a+b+ABS(a−b))/2
    The larger: max(lot start, issue start).
    (x+ABS(x))/2
    Overlap, or 0 if the stretches do not meet.
    *Lots!$E$5:$E$304
    Times each lot's unit cost.
    SUMPRODUCT(…)
    Added over all lots.

    With the sample data: E5 = 0, C5 = 4 → F5 result 73.96

    How it is used: Summed per item as cost of goods issued. An issue of 10 that takes 4 units at $32.00 and 6 at $33.10 costs $326.60.

    How to change it: Nothing to change.

    Learn this: Essential Excel Functions: SUM, AVERAGE, COUNT, MIN and MAX →
    Stock checkIssues!H5 · copied down to row 604
    =IF(A5="", "", IF(E5+C5>SUMIFS(Lots!$D$5:$D$304, Lots!$B$5:$B$304, B5, Lots!$C$5:$C$304, "<="&A5),
        "Short", "OK"))

    Short if this issue would take the item past the units received by its date.

    Piece by piece

    E5+C5
    Units issued after this one.
    SUMIFS(Lots!$D$5:$D$304, Lots!$B$5:$B$304, B5, Lots!$C$5:$C$304, "<="&A5)
    Units received by the issue date.

    With the sample data: E5 = 0, C5 = 4 → H5 result OK

    How it is used: Counted on Start Here B19 and in the checks.

    How to change it: Fix the date or quantity, or log the missing receipt.

    Learn this: How to Use SUMIF and SUMIFS in Excel →
    Next lot to pickItems!J5 · copied down to row 34
    =IF(A5="", "", IFERROR(INDEX(Lots!$A$5:$A$304, MATCH(1, INDEX((Lots!$B$5:$B$304=A5)*(Lots!$J$5:$J$304>0), 0), 0)),
        "None"))

    The first lot down the list (so the oldest) for this item that still has units.

    Piece by piece

    (Lots!$B$5:$B$304=A5)*(Lots!$J$5:$J$304>0)
    1 for lots of this item with stock.
    INDEX(…, 0)
    Lets MATCH search the array without Ctrl+Shift+Enter.
    MATCH(1, …, 0)
    First such lot.
    INDEX(Lots!$A$5:$A$304, …)
    Its lot number.

    With the sample data: A5 = OIL-1L → J5 result L26073

    How it is used: The pick instruction for FIFO rotation.

    How to change it: Nothing to change.

    Learn this: How to Use INDEX and MATCH in Excel →
    Earliest expiry on handItems!K5 · copied down to row 34
    =IF(OR(A5="", F5=0), "", MINIFS(Lots!$F$5:$F$304,
        Lots!$B$5:$B$304, A5, Lots!$J$5:$J$304,
        ">0"))

    The soonest expiry date among this item's lots that still hold stock.

    Piece by piece

    MINIFS(Lots!$F$5:$F$304, Lots!$B$5:$B$304, A5, Lots!$J$5:$J$304, ">0")
    Minimum expiry where item matches and units remain.

    With the sample data: A5 = OIL-1L → K5 result Mar 25, 2028

    How it is used: Drives the item status.

    How to change it: Nothing to change.

    Learn this: How to Use MIN and MAX in Excel →
    Value by age bucketAging!E5 · copied down to row 9
    =SUMIFS(Lots!$K$5:$K$304,
            Lots!$L$5:$L$304, ">="&B5,
            Lots!$L$5:$L$304, "<="&C5)

    Adds remaining value of lots whose age falls between the bucket limits.

    Piece by piece

    Lots!$K$5:$K$304
    Remaining value.
    Lots!$L$5:$L$304, ">="&B5
    Age at least the From value.
    …, "<="&C5
    And at most the To value.

    With the sample data: E5 result 33,346.45

    How it is used: The Start Here chart; the total must equal FIFO value.

    How to change it: Edit the limits in columns B and C.

    Learn this: How to Use SUMIF and SUMIFS in Excel →

    Tips and limits

    • Capacity: 30 items, 300 lots, 600 issues. For a longer history, start a new file each year with opening lots at their remaining quantities and costs.
    • Enter lots and issues in date order. FIFO depends on order, and the Lots column O and Issues column H checks tell you when something is out of place.
    • Returns to stock: enter them as a new lot at the cost they were issued at.
    • Stock adjustments (damage, count differences): enter shortages as issues with a reference such as ADJ, and overages as a new lot.
    • FIFO is for valuation and rotation. If you must pick by expiry (FEFO) instead, use Items column K and the Lots status.

    Learn the skills behind this template

    Was this guide helpful? Spot a mistake? Send feedback · admin@arumsoft.com