If ending inventory and cost of goods sold are added together, they should equal gross profit

  • Accounting

Guide to Understanding the Cost of Goods Sold (COGS)

What is Cost of Goods Sold (COGS)?

Cost of Goods Sold (COGS), otherwise known as the “cost of sales”, refer to the direct costs incurred by a company while selling its goods/services.

If ending inventory and cost of goods sold are added together, they should equal gross profit

Table of Contents

  • How to Calculate COGS (Step-by-Step)
  • Cost of Goods Sold vs. Operating Expenses
  • COGS vs. Gross Profit
  • How to Interpret Cost of Goods Sold
  • Cost of Goods Sold Formula
  • COGS Calculator – Excel Model Template
  • Step 1. Cost of Goods Sold Calculation
  • Step 2. Gross Profit and Gross Margin Calculation
  • Step 3. Project COGS

How to Calculate COGS (Step-by-Step)

The cost of goods sold (COGS) is the accounting term used to describe the direct expenses incurred to produce revenue.

On the income statement, the cost of goods sold (COGS) line item is the first expense following revenue (i.e. the “top line”).

Cost of Goods Sold Examples
  • Purchase of Inventory/Merchandise
  • Cost of Raw Materials
  • Cost of Direct Labor

The categorization of expenses into COGS or operating expenses (OpEx) is entirely dependent on the industry in question.

For instance, the “Cost of Direct Labor” is recognized as COGS for service-oriented industries where the production of the company’s goods sold is directly related to labor.

But not all labor costs are recognized as COGS, which is why each company’s breakdown of their expenses and the process of revenue creation must be assessed.

As another industry-specific example, COGS for SaaS companies could include hosting fees and third-party APIs integrated directly into the selling process.

IRS Definition of Cost of Goods Sold

If ending inventory and cost of goods sold are added together, they should equal gross profit

COGS Definition (Source: IRS.gov)

Cost of Goods Sold vs. Operating Expenses

Conversely, COGS excludes operating expenses – i.e. indirect costs – such as overhead costs, utilities, rent, and marketing expenses.

While a broad generalization, COGS tend to consist of variable costs, as the value is dependent on the production volume.

In contrast, OpEx tends to consist of fixed costs, which means the value remains relatively constant regardless of the level of production output.

For example, a company’s rental expense for a facility remains fixed based on a signed rental agreement.

COGS vs. Gross Profit

The gross profit metric represents the earnings remaining once direct costs (i.e. COGS) are deducted from revenue.

Gross Profit = Revenue – Cost of Goods Sold (COGS)

The gross profit helps determine the portion of revenue that can be used for operating expenses (OpEx) as well as non-operating expenses like interest expense and taxes.

In addition, the gross profit of a company can be divided by revenue to arrive at the gross profit margin, which is among one of the most frequently used profit measures.

Gross Margin (%) = (Revenue – COGS) / Revenue

For companies attempting to increase their gross margins, selling at higher quantities is one method to benefit from lower per-unit costs.

If a company orders more raw materials from suppliers, it can likely negotiate better pricing, which reduces the cost of raw materials per unit produced (and COGS).

How to Interpret Cost of Goods Sold

Calculating the COGS of a company is important because it measures the real cost of producing a product, as only the direct cost has been subtracted.

In effect, the company gets a better sense of the cost of producing the good or providing the service – and thereby can price their offerings better.

Generally speaking, COGS will grow alongside revenue because theoretically, the more products/services sold, the more must be spent for production.

But of course, there are exceptions, since COGS varies depending on a company’s particular business model.

Matching Principle

Under the matching principle of accrual accounting, each cost must be recognized in the same period as when the revenue was earned.

For instance, just the costs associated with the inventory sold in the current period can be recognized on the income statement, which is where the LIFO vs FIFO inventory accounting methods can be a source of debate.

Cost of Goods Sold Formula

The calculation of COGS is distinct in that each expense is not just added together, but rather, the beginning balance is adjusted for the cost of inventory purchased and the ending inventory.

Cost of Goods Sold (COGS) = Beginning Inventory + Purchases in the Current Period – Ending Inventory

  • Beginning Inventory → The amount of inventory rolled over (i.e. leftover) from the prior period
  • Purchases in Current Period → The cost of purchases made during the current period
  • Ending Inventory → The inventory NOT sold during the current period

COGS Calculator – Excel Model Template

We’ll now move to a modeling exercise, which you can access by filling out the form below.

Step 1. Cost of Goods Sold Calculation

Let’s say there’s a clothing retail store that starts off Year 1 with $25 million in beginning inventory, which is the ending inventory balance from the prior year.

Throughout Year 1, the retailer purchases $10 million in additional inventory and fails to sell $5 million in inventory.

With that said, the COGS in Year 1 can be calculated with the following simple formula:

  • COGS = $25m + $10m – $5m = $30m

Step 2. Gross Profit and Gross Margin Calculation

The $30 million in COGS is then linked back to the gross profit calculation, but with the sign flipped to show that it represents a cash outflow.

The gross profit is equal to $50 million in Year 1 ($80m – $30m), while the gross margin is 62.5%.

  • Gross Profit = $80m – $30m = $50m
  • Gross Margin (%) = $80m / $50m = 62.5%

If ending inventory and cost of goods sold are added together, they should equal gross profit

Step 3. Project COGS

To wrap up our post on COGS, we’ll conclude with a quick explanation of one forecasting approach of COGS often seen in financial models.

Since public companies are not obligated by the SEC to disclose confidential data regarding their internal inventory data, one method is to assume a gross margin based on historical (and industry) averages.

Here in our example, we assume a gross margin of 80.0%, which we’ll multiply by the revenue amount of $100 million to get $80 million as our gross profit.

In the final step, we subtract revenue from gross profit to arrive at – $20 million as our COGS figure.

If ending inventory and cost of goods sold are added together, they should equal gross profit

If ending inventory and cost of goods sold are added together, they should equal gross profit

Step-by-Step Online Course

Everything You Need To Master Financial Modeling

Enroll in The Premium Package: Learn Financial Statement Modeling, DCF, M&A, LBO and Comps. The same training program used at top investment banks.

Enroll Today

When inventory is sold the cost of inventory is recognized as a?

The cost of the inventory becomes an expense when a business earns revenue by selling its products/ services to the customers. The cost of inventories flows as expenses into the cost of goods sold(COGS) and appears as expenses items in the income statement.

Is inventory a cost of goods sold?

In all cases, inventory is something the company will re-sell to someone else. Inventory cost is an asset until it is sold; after merchandise is sold, the cost becomes an expense, called Cost of Goods Sold (COGS). A journal entry transfers costs from the Balance Sheet to the Income Statement.

Which of the following items should not be included in the cost of ending inventory?

Answer and Explanation: The correct answer is option b) purchased units in transit, shipped FOB destination. The computation of ending inventory is computed using the following formula. Accordingly, the purchased units in transit, shipped FOB destination must not be included in the total cost of ending inventory.

What is included in cost of ending merchandise inventory?

Merchandise inventory includes a range of costs a retailer incurs in the course of obtaining the products it intends to sell to its customers. It includes the price paid for the goods, shipping costs paid by the resellers or retailer and any other associated expenses, such as transit insurance and packaging.