---
title: "Cost of goods sold"
description: "What is cost of goods sold (COGS)? The cost of the stock you sold in a period. Learn how it's calculated, when it's recorded and why it decides gross margin."
url: https://1flux.ai/glossary/cost-of-goods-sold
last_updated: 2026-10-10
---

[Accounting](https://1flux.ai/glossary#accounting)

# Cost of goods sold

What is cost of goods sold, and why should it be recorded when goods leave stock?

Glossary Updated 10 October 2026

Definition

Cost of goods sold (COGS) is the cost of the stock a business has sold in a period, valued using its inventory costing method.

## What is cost of goods sold used for?

Revenue minus COGS gives gross profit, so getting COGS right is essential to knowing real margins. For a trader, COGS is mainly the purchase cost of the goods sold, plus any costs included in inventory, such as inbound freight. It’s recorded when goods leave stock, not when they’re bought. The periodic formula is opening stock + purchases − closing stock.

Gross profit for one month

Example

- Revenue: 1,000 units sold

  USD 45,000

- COGS: 1,000 units at an average of USD 32

  USD 32,000

Gross profit

USD 13,000

Calculating COGS only from a month-end count hides margin problems until it’s too late. The cost per unit comes from your [inventory valuation](https://1flux.ai/glossary/inventory-valuation) method.

In 1flux

Each delivery note posts cost of goods sold against inventory at the entity’s costing method, in the same step as the stock leaves the warehouse. [See automated posting](https://1flux.ai/products/accounting/automated-posting)

Related

## Keep exploring

### [Inventory valuation](https://1flux.ai/glossary/inventory-valuation)

The money value of the stock you hold.

### [Weighted average cost](https://1flux.ai/glossary/weighted-average-cost)

A costing method that values all units at their average cost.

### [Delivery note](https://1flux.ai/glossary/delivery-note)

The document that travels with goods so the customer can check and sign.

### [Automated posting](https://1flux.ai/products/accounting/automated-posting)

Receipts, deliveries, invoices and payments post balanced journals through one gateway.

Last updated 10 October 2026
