Skip to content
Penahak now runs hotels, restaurants and retail on one ledger.
Penahak

How stock is valued and what a sale costs

Penahak values stock first in, first out (FIFO): the oldest goods are assumed to be sold first. The cost of a sale and the value of what is left are worked out from the stock entries each time a value report runs.

  • Accounting Stock basics
  • 6 min read
  • Updated October 20, 2026

For Accountant Owner or manager Store keeper

On this page

First in, first out

Penahak values stock first in, first out (FIFO). Think of each purchase as a pile of goods with its own cost per unit. When you sell, the goods are taken from the oldest pile first, and the sale costs what that pile cost. What remains in the warehouse is valued at the cost of the newer piles.

Example
1 January: you buy 10 units at 100Pile 1: 10 units, 1,000
5 January: you buy 10 units at 120Pile 2: 10 units, 1,200
8 January: you sell 12 unitsCost: 10 at 100 and 2 at 120 = 1,240
Left in stock8 units at 120 = 960

The piles are kept per warehouse (and per batch for a batch-tracked product). Goods taken from one warehouse use that warehouse's piles; a transfer starts a new pile in the receiving warehouse (Move stock between warehouses with a stock transfer).

What counts as cost

Cost of a pileFrom
A purchaseThe line's value, plus any adjustment you marked Stock valuation (freight, customs and the like), so these become part of the cost (Set up VAT, discounts and other purchase adjustments, Add a cost to a purchase with an add-on voucher)
Opening stockThe quantity times the rate you typed (Opening stock)
A stock-take or adjustment inThe quantity times the rate you typed (Adjust stock: counts, damage, expiry and write-offs)
A return from a customerThe Stock rate on the return line
A transfer inThe rate on the transfer line
Finished goodsThe cost of the raw materials and fixed costs, shared over the quantity produced; the approved quantity comes in at that rate (Production journal: record production and approve it)

Selling price is never cost. A discount, VAT or a sales add-on does not change what the goods cost, except that a sales add-on charge you mark as counting toward profit is added to the cost shown in profit reports (Add a charge or cost to an invoice (sales add-on voucher)).

When the cost is worked out

The cost of each sale is worked out when a value report runs, not when you save the sale:

ReportBrings the cost of sales up to date
Stock summary (every report type) and the stock valuation printEvery time you open it
Profit and Loss (standard layout), Profitability ReportEvery time you open it
Profit and Loss as a T-format report typeNot by itself: it shows the values as last worked out
Balance SheetWhen Include closing stock is ticked
Stock ledger detailsWhen Stock Re-calculation is ticked
Stock Analysis ReportNot by itself: it shows the values as last worked out

A value you read on Stock Analysis Report can therefore be older than the Stock summary. Open the Stock summary first when you want them to agree.

The Rate you see next to a product on a line is the average cost of what is in that warehouse now (value divided by quantity). When the warehouse is empty, Penahak shows the product's Buy rate instead.

The cost of goods sold

Penahak does not post a "cost of goods sold" entry to a ledger when you sell. Profit is worked out in the reports from the opening stock, the purchases, the sales and the closing stock (Closing stock in the profit and loss, the balance sheet and the year end). The Profitability Report shows sales against cost by product (Profitability Report: sales against cost).

Common questions

Can I choose weighted average instead of FIFO?

Not in this release. The field exists on the product, but valuation always follows FIFO.

Why did the value of my stock change when I opened a report?

Reports bring the cost of every sale up to date first. A purchase or an adjustment entered after the last report changes the piles, so the values move. This is normal.

Why is the profit on a sale wrong?

More of the product went out of that warehouse than ever came in, so part of the sale had no cost to take, or the goods came in at a rate of 0. Enter the missing purchase or correct the rate, and run the report again.

A transfer changed my total stock value.

The goods go out at their first-in-first-out cost but come in at the rate on the transfer line. Keep the rate the screen proposes: it is the average cost of what the From warehouse holds, so the two match when that warehouse holds one lot, and come close otherwise (Move stock between warehouses with a stock transfer).

Related guides