Skip to content
Guides/Fundamentals
Guide 05

Cost of Goods Sold vs. Operating Expense: Where the Line Goes and Why Gross Margin Depends on It

Every cost a business pays lands on one side of a line: cost of goods sold or operating expense. Gross margin is the number that line produces. This page defines the split, shows how it looks in a chart of accounts, and walks it through a journal entry and a multi-step income statement.

Read 9 min readUpdated Sections 4Format Open access
Cost of goods sold

Cost of goods sold is the direct cost of the products or services a business actually sold in a period, as distinct from operating expense, which is the cost of running the business whether or not anything sold. Revenue minus cost of goods sold is gross margin, and that number only means something when the same costs sit on the same side of the line every month.

1 · StructureWhich accounts exist
2 · RecordingHow a transaction resolves
3 · ReportingHow accounts become statements
4 · InsightWhich questions you can answer

Every dollar a business spends on its income statement ends up in one of two places. Either it was spent to produce or buy the specific thing that was sold, or it was spent to keep the business running. The first group is cost of goods sold. The second is operating expense. Nothing about a cost's name decides which side it lands on. A wage can be either. Rent can be either. Depreciation can be either. What decides is whether the cost rises and falls with what you sold, or with the fact that you are open.

The reason this split matters is a single number: gross margin. Revenue minus cost of goods sold tells you what is left to pay for everything else. A business with a 40 percent gross margin and a business with a 20 percent gross margin need very different operating cost structures to survive, even at the same revenue. If direct costs drift into operating expense, gross margin looks better than it is. If overhead drifts into cost of goods sold, it looks worse. Either way the number stops telling you anything, and the total profit at the bottom is identical, so nothing on the surface warns you.

Section 01

Structure

A chart of accounts makes the split permanent by giving each side its own number range. Cost of goods sold accounts sit in the 5000s, directly below revenue. Operating expense accounts sit in the 6000s. Once an account has a number, every transaction coded to it lands on the same side of gross margin, and the income statement draws the line without anyone deciding each month. Read the account numbering guide for how the full range system works.

The default QuickBooks chart does not force this. It gives you an account type called Cost of Goods Sold, but many businesses start with a single Cost of Goods Sold account and pile every other cost into one long list of expenses. The change that makes gross margin usable is the one below.

One expense bucket → cost of sales split from operating expense
  • Expensesone list, no gross margin line
  • 5000Materials and Purchasescogs
  • 5100Direct Laborcogs
  • 5200Freight Incogs
  • 5300Subcontractorscogs
  • 6000Rent - Officeoperating
  • 6100Salaries - Administrativeoperating
  • 6200Advertising and Marketingoperating
  • 6300Office Suppliesoperating
  • 6400Delivery Expense (freight out)operating
1 removed+9 added

Two of those rows show the rule in action. Freight in, the cost of getting goods to you, is part of what the goods cost, so it sits in the 5000s. Freight out, the cost of shipping a sale to a customer, is a selling cost and sits in the 6000s. Same word, opposite sides of the line, because one cost attaches to the product and the other attaches to the sale.

Section 02

Recording

The split is decided at the moment a cost is coded, not when the report runs. Consider a small furniture maker that buys 3,200 dollars of lumber and pays 180 dollars to have it delivered. Both costs attach to the product, so both go to cost of goods sold accounts. Figures are illustrative.

Entry 1 · Buy materials and pay the inbound freight
AccountDebitCredit
5000Materials and Purchases3,200
5200Freight In180
2000Accounts Payable3,380
Totals3,3803,380

Both lines sit above gross margin. The freight is part of what the lumber cost to obtain.

The same week the business pays 2,400 dollars of office rent and 350 dollars to run an online ad. Neither cost changes with how many tables were built or sold. They go to operating expense accounts.

Entry 2 · Pay office rent and an advertising invoice
AccountDebitCredit
6000Rent - Office2,400
6200Advertising and Marketing350
1000Cash - Operating2,750
Totals2,7502,750

Both lines sit below gross margin. They are the cost of being open, not the cost of a table.

If the business tracks inventory, the materials in Entry 1 would first go to an inventory asset account and move to cost of goods sold when the table sells. That timing question is covered in the account types guide. The side of the line does not change: whenever the cost reaches the income statement, it reaches it as cost of goods sold.

Section 03

Reporting

The income statement is where the split pays off. A simple, single-step statement lists all revenue, then all expenses, and gives one profit number. A multi-step statement deducts cost of goods sold first, shows gross margin as its own line, then deducts operating expense to reach income from operations. The 5000 and 6000 ranges are what let the report do that without manual sorting.

Multi-step income statement, excerpt · one month
Sales48,000
Cost of goods sold
Materials and Purchases14,600
Direct Labor9,200
Freight In640
Subcontractors2,100
Total cost of goods sold26,540
Gross margin21,460
Operating expenses
Rent - Office2,400
Salaries - Administrative7,800
Advertising and Marketing1,150
Office Supplies310
Delivery Expense (freight out)720
Total operating expenses12,380
Income from operations9,080

Example figures.

Gross margin here is 21,460 on 48,000 of sales, or about 45 percent. That figure is what an owner compares month to month, what a lender compares against other businesses in the same trade, and what tells you whether a pricing problem or a spending problem is eating the profit. Move the 720 dollars of delivery expense up into cost of goods sold and the margin drops to about 43 percent. Move direct labor down into operating expense and it jumps to about 64 percent. Income from operations is 9,080 in all three cases. The line moved; the profit did not; the ability to read the business did.

Under GAAP (Generally Accepted Accounting Principles) there is no fixed list of which costs belong in cost of goods sold. The standard asks that the presentation be consistent and that costs be matched to the revenue they produced. The practical rule is the one this page keeps repeating: choose the line once, number the accounts so the line is enforced, and do not move it.

Section 04

Insight

Without these accounts you cannot answer
  1. 01Did margin fall because we paid more for what we sell, or because we spent more running the shop? With one expense list, both changes look the same.
  2. 02Can we afford to cut prices by ten percent? Without a real gross margin figure, the answer is a guess about how much of each sale is left after direct costs.
  3. 03Are we in line with other businesses in our trade? A lender or buyer compares gross margin first, and a margin built on an inconsistent split cannot be compared with anything.

Where the line goes in a particular trade is the subject of the industry guides built on this foundation. Each one lists the specific 5000-series accounts for that business and the costs that belong in them. To see whether your own chart draws the line, and where it does not, try the free demo →.

Questions

Frequently asked questions.

Is rent cost of goods sold or an operating expense?

It depends on what the space does. Rent on a factory floor or a commercial kitchen is part of producing what you sell, so it belongs in cost of goods sold. Rent on an office is an operating expense. The test is whether the cost scales with what you produce and sell, or with keeping the doors open.

Does a service business have cost of goods sold?

Yes, though many call it cost of services or cost of revenue. The wages of the people who deliver the service, subcontractors, and materials used on client work are direct costs. Sales, admin, and office costs stay in operating expense.

What happens if I put a direct cost in operating expense?

Gross margin is overstated for that period, and it moves every time the mistake is made or corrected. The total profit is unchanged. What you lose is the ability to compare margin from month to month, or against other businesses.

Apply this to a real chart

The principles are easy. Applying them is the work.

This guide is the theory. The free demo helps you review a real QuickBooks Online chart with a score, structural diff, and prioritized cleanup plan.

  • +Score the chart across the health dimensions
  • +Compare structure against a reference pattern
  • +Prioritize cleanup work before changing books
  • +Review recommendations before anything is applied