From Instant Cost to Accurate Cost: FIFO Cost Logic in Production
See the instant cost the moment you make a production entry, and finalize your batch-based actual raw material cost with the night-running FIFO motor. Here is the practical working logic.

On this page
What Happens to Costs When You Have Batches of the Same Raw Material at Different Prices?
In your workshop or production facility, you purchase the same raw material multiple times throughout the year. While the last 3 liters of the vegetable oil you bought last month at 400 TL per liter are still sitting on the shelf, another 5 liters of the same oil might have arrived this week at 520 TL. When you spend a total of 5 liters of this oil this afternoon while producing 50 bottles of care oil, which price should be used to calculate the unit cost of the product?
If you calculated all production solely based on the latest purchase price of 520 TL, you would see the cost as higher than it actually is; if you used only the old 400 TL price, you would ignore the new, hiked stock. Moreover, a business owner who wants to quickly enter production records during the day does not want to waste time with complex batch selections. The solution is a workflow that provides a practical instant cost at the time of entry and finalizes costs at the end of the day using the FIFO (First In, First Out) rule.
Why Simple Recipes and a Nighttime FIFO Engine Instead of Heavy ERP and MRP?
In enterprise ERP and MRP systems, users are generally forced to select barcoded batches before or after production, complete multi-stage approval workflows, or run end-of-day cost-closing operations. These processes create an unnecessary operational burden for small and medium-sized businesses, cosmetic workshops, food producers, and e-commerce manufacturers.
As a pre-accounting platform, Qolay.App offers lean automation instead of ERP complexity. In the Recipes and Production Entries screens, you work with a single-form, single-record logic; the web and mobile (iOS/Android) experience is identical. When you record your production during the day, the system immediately calculates an Instant Cost for that moment; then, the FIFO engine running at night sorts all purchase and stock movements in chronological order, automatically finalizing the true raw material cost.
Realistic Scenario: FIFO Finalization in 50 Units of Argan Hair Care Oil
Let's produce 50 units of 100 ml Argan Hair Care Oil in a natural cosmetics workshop. There are 3.00 liters of Argan Oil remaining from the 1st batch (400 TL/lt) and 5.00 liters of Argan Oil from the newly received 2nd batch (520 TL/lt) in the warehouse. A total of 5.00 liters of Argan Oil is required for production; the nighttime FIFO engine consumes 3 liters from the old batch and the remaining 2 liters from the new batch to establish the final cost:
| Cost Item (For 50 Units) | Batch / Calculation Detail | Final Amount (TL) |
|---|---|---|
| Cold Pressed Argan Oil (1st Batch) | 3.00 lt × 400 TL/lt (old stock is depleted) | 1,200.00 TL |
| Cold Pressed Argan Oil (2nd Batch) | 2.00 lt × 520 TL/lt (from new purchase) | 1,040.00 TL |
| Vitamin E Carrier Oil | 0.50 lt × 600 TL/lt | 300.00 TL |
| Raw Material Total (Final FIFO) | 1,200 + 1,040 + 300 | 2,540.00 TL |
| Filling Prep & Energy (Service–Rate) | Raw material only (2,540 TL) × 10% | 254.00 TL |
| Labeling & Quality Control (Service–Amount) | Fixed per batch (multiplication disabled) | 256.00 TL |
| Glass Bottle + Dropper (Stock) | 50 units × 15 TL (multiplication enabled) | 750.00 TL |
| Oil Spilled During Filling (Enter Waste) | 0.25 lt × 520 TL (from 2nd batch, not included in 10% base) | 130.00 TL |
| Total Production Cost | 2,540 + 130 + (254 + 256 + 750) | 3,930.00 TL |
| Final Unit Cost (÷ 50 Units) | 3,930.00 ÷ 50 | 78.60 TL / unit |
Notice that if the argan oil cost were calculated entirely from the latest purchase (5 × 520 = 2,600 TL), the raw material total would look 360 TL higher. The nighttime FIFO engine first closes out the old 3 liters at 400 TL and deducts the remaining 2 liters and the 0.25 liter waste from the 520 TL batch, arriving at the true unit cost of 78.60 TL.
Step-by-Step Instant and Final Cost Workflow with Qolay.App
To get maximum efficiency from the FIFO logic in the background of the system, you can set up your daily workflow as follows:
- 1. Monitor Current Cost Order in the Recipe (Production → Recipes): In the cost summary on the recipe, the system bases calculations on the remaining stock FIFO cost. If stock has dropped to zero, it looks at the latest purchase price; if there are no purchase invoices yet, it displays 0 TL and gives a "No cost" warning.
- 2. Record Production During the Day (Production → Production Entries): Enter the production quantity (50 units) and check additional costs. Process filling waste through the Enter Waste window. The moment you save, stocks are updated and the instantaneous estimated cost is calculated.
- 3. Don't Panic Over Negative Stock: Even if you process the raw material invoice a day after production, the system does not block the record; it only gives an insufficient stock warning. When you enter your invoice, the negative stock is closed out.
- 4. See Finalization After the Nighttime FIFO Engine: The nighttime FIFO engine scans daytime purchase and production sequences, matching both instant records and subsequently processed purchase invoices with the correct layers to write the final cost.
- 5. Use Reports and the Production Slip PDF (Production → Reports): The next day, you can filter the Production Summary and Raw Material Consumption reports for up to 366 days and export them to Excel, or print out the Production Slip PDF for your accountant.
4 Common Mistakes in FIFO Cost Tracking
- Not Entering Purchase Invoices in Chronological Order: Entering a back-dated purchase invoice too late creates temporary discrepancies until productions made after that date are re-sorted by the nighttime FIFO engine; processing invoices as up-to-date as possible is best practice.
- Mistaking the Instant Cost at Entry for Final and Leaving Uninvoiced Production Open: A raw material without a purchase invoice entered will display a "No cost" (0 TL) warning. If a profitability report is pulled before the invoice is processed, the cost will appear low.
- Entering Finished Goods Without Producing Semi-Finished Goods Separately: If a semi-finished product hasn't entered stock with its own production entry, the FIFO layers of its sub-components cannot be transferred to the finished good cost. Producing the semi-finished good first is mandatory.
- Opening Unnecessary Duplicate Product Cards for the Same Raw Material: Opening a separate stock card for a new batch of the same oil bought at a different price disrupts the FIFO flow. Purchase invoices should be processed through a single product card.
Frequently Asked Questions
Why might the instant cost I see at entry change slightly the next day?
In the event of a purchase invoice entered during the day, a production adjustment made, or the intersection of multiple purchase batches, the nighttime FIFO engine recalculates all movements in chronological FIFO order to clarify the final cost.
If I produced with negative stock, will the cost correct itself when I enter the purchase invoice later?
Yes. Stock insufficiency gives a warning but does not stop the record. When you enter the purchase invoice for the missing raw material, the negative stock is corrected and the nighttime FIFO engine finalizes the cost at the correct purchase price.
Is FIFO finalization also valid for waste lines?
Yes. The raw material quantity deducted through the Enter Waste window is also deducted from warehouse stock in FIFO order and added to the total production cost, but it is not included in the Service–Rate (%) base.
What happens to stock if I subsequently edit or delete a production record?
When a Production Entry is edited or deleted, consumed raw materials, waste, stock-type additional costs, and produced finished good stock movements are automatically updated or reversed.
Price with Confidence Using Real FIFO Costing
You can take advantage of Qolay.App's lean FIFO infrastructure to track production costs without the hassle of selecting batches and without mixing up old and new purchase prices. For details, you can visit the Qolay.App Production Management page; you can also read our articles on Stock Cost and Valuation Methods and Preventing Stock Tracking Errors. The Production Management module is offered as a separate add-on in Qolay Market and can be tested with a trial period. Take control of your production and stock costs right away by opening a free account on Qolay.App.
This article is for general informational purposes. Consult your financial advisor for stock valuation methods and tax legislation practices.
Try it after reading
Start applying what you read with Qolay.App — for free.
Related articles
Other guides close to this topic.

Weight, Box, and Packaging Costs in Boutique Chocolate and Confectionery Workshops
Managing Couverture, Filling, and Gift Box Costs Together
Learn how to manage couverture weights, filling semi-finished products, tempering waste, and luxury gift box costs in boutique chocolate, madlen, and confectionery workshops.

How to Read Production Summary, Raw Material Consumption, Scrap, and Bill of Materials Cost Reports
Profitability, Consumption, and Scrap Decisions Through Production Reports
Learn how to manage raw material consumption, scrap costs, and profit margins by reading the four core reports in the Qolay.App Production Management module.