Inventory & Warehouse

Cost of goods sold (COGS) explained

Learn how COGS is calculated and why it matters for your profit.

Jul 11, 2026

What is COGS?

Cost of Goods Sold (COGS) is the actual cost to you of the items you sell. It is not the same as the selling price — it is the original purchase cost (or manufacturing cost) of those units, as recorded by the system.

When you sell an item for 500 AFN but it cost you 300 AFN to buy, your COGS is 300 AFN. The difference (200 AFN) is your profit on that sale.

Why COGS matters

COGS directly affects three critical pieces of your business:

  1. Your profit margin — The lower your COGS, the higher your profit on the sale. If COGS is wrong, your reported profit is wrong.

  2. Your tax obligation — Most tax systems allow you to deduct COGS from your revenue when calculating taxable profit. Accurate COGS means accurate tax liability.

  3. Your financial reports — Your balance sheet shows the cost of inventory on hand, and your profit & loss statement shows the cost of inventory that left (COGS). These must be consistent to pass audit.

How Usystems calculates COGS

When you create a sales document (invoice, sales receipt, or POS sale), Usystems automatically calculates COGS for each line:

  1. Look up the weighted average cost — The system retrieves the current weighted average cost of that item (based on all purchases to date).

  2. Multiply by quantity sold — COGS = weighted average cost × quantity sold.

  3. Record the deduction — The system reduces the inventory balance and posts the COGS amount to your profit & loss statement.

Example: You have 50 units of Product A with a weighted average cost of 100 AFN each. You sell 10 units on an invoice at 250 AFN per unit.

  • COGS recorded: 10 × 100 = 1,000 AFN
  • Revenue recorded: 10 × 250 = 2,500 AFN
  • Profit on this line: 2,500 − 1,000 = 1,500 AFN

The sale does not use the selling price to calculate cost — only the weighted average purchase cost is used.

Where COGS appears in your reports

  • Individual documents — On invoices, sales receipts, and sales orders, each line shows a "Cost" column.

  • Profit & loss statement — The total COGS for a period is listed as a main line item, subtracted from total revenue to calculate gross profit. Open in Usystems

  • Inventory balance — Your balance sheet shows the total value of remaining inventory (sum of all units × their weighted average costs).

COGS and multi-currency

If you sell in one currency but your inventory cost is recorded in another, Usystems converts the COGS to the sales currency using the exchange rate on the sale date. This ensures your profit & loss statement is always in a single currency.

What COGS is not

  • COGS is not the selling price. It is the cost you incurred, not the price you charge.
  • COGS is not just the price on the invoice. It is the original unit cost, regardless of what price you mark up to.
  • COGS is not affected by discounts. If you sell at a discount, COGS remains the same — your profit margin shrinks, not your cost.

Was this helpful?

More like this