COGS stands for Cost of Goods Sold — what the products you sold actually cost you to buy or make. It's the single biggest cost for most stores and the foundation of every profit number, so getting it right matters more than almost anything else.

What COGS includes (and doesn't)

Include the direct cost of the product:

  • the price you paid your supplier (or the cost to manufacture);
  • inbound freight and import duties to get the stock to you;
  • per-unit packaging that's part of the product.

Exclude costs that aren't tied to a specific unit — marketing, rent, salaries, payment fees and outbound shipping are real costs, but they're not COGS. They come out later to get to net profit.

The COGS formula

COGS = beginning inventory + purchases − ending inventory

For a single order, it's simpler — the unit cost of each item times the quantity sold:

Order COGS = Σ (unit cost × quantity)

FIFO vs LIFO vs average cost

When your unit cost changes over time, which cost do you apply to a sale? Three common methods:

  • FIFO (first in, first out) — use the oldest cost first. The most common and usually the most accurate for physical goods.
  • LIFO (last in, first out) — use the newest cost first.
  • Weighted average — blend all costs into one average per unit.

The method changes your reported COGS — and therefore your margin — so pick one and apply it consistently.

Why COGS is the foundation of profit

COGS drives gross profit and gross margin(Revenue − COGS). If a product has no cost recorded, its COGS counts as $0 and profit looks better than it is — the most common reason store owners overestimate how well they're doing.

Track it automatically

Keeping unit costs current across a whole catalogue — and applying the right one by date — is exactly what ProfitVault does: set your product costs once (FIFO, LIFO or average) and it computes COGS on every order automatically.