June 5, 2025

How to record cost of goods sold: COGS journal entry

Explore this topicOpen ChatGPT

Accurately recording cost of goods sold (COGS) is essential if your business produces or sells products. A precise COGS journal entry helps you track inventory, calculate gross profit, and maintain accurate financial reporting. Whether you’re a small business owner, bookkeeper, or accountant, mastering this entry is crucial for understanding profitability and tax compliance.

Here, we walk through the steps to record COGS, provide journal entry examples, and explain how COGS impacts your business’s financial health.

What is cost of goods sold (COGS)?

COGS refers to the total direct costs your business incurs to produce or acquire the products you sell. This includes raw materials, direct labor, and other manufacturing and production costs.

You record COGS on your company’s income statement, which affects gross profit and net income. While COGS reduces your gross profit, it also helps you calculate your business’s profitability by subtracting it from sales revenue. Because it has broad implications on your financials, accurately calculating COGS requires meticulous expense tracking.

Why is COGS important?

Understanding COGS helps you maintain profitability, optimize pricing, and lower your tax burden as part of your broader financial management strategies. Here's why it matters:

Gross margin and profitability

Gross margin is the difference between sales revenue and COGS, reflecting how efficiently your business produces and sells goods. A higher gross margin means better profitability.

Profitability and business valuation

If you understand COGS, you can adjust your pricing strategies, focus on high-margin products, and identify opportunities to reduce costs or improve supplier terms. Because COGS is a key factor in assessing your profitability, it has a major downstream impact on your business valuation. Lower COGS improves gross profit, making your business more attractive to potential buyers or investors.

Taxable income and compliance

COGS is a deductible business expense you can write off on your taxes, helping to reduce your taxable income and lowering your overall tax burden. Misreporting COGS can lead to tax overpayment or, worse, underpayment, which could lead to audit risks.

tip
Optimize COGS for better profitability.

Regularly analyze COGS to identify cost-saving opportunities, such as renegotiating supplier contracts or improving production efficiency. Monitor your gross margin to align pricing strategies with profitability goals, and ensure accurate COGS deductions for tax savings. Reducing COGS can enhance gross profit and increase your appeal to investors, which can lead to a higher business valuation.

How to calculate cost of goods sold step by step

The formula for calculating COGS is simple, but it can vary depending on your inventory method and specific business scenarios. Here’s the standard formula to calculate COGS for a given accounting period:

COGS = Beginning Inventory + Purchases – Ending Inventory

Step 1: Gather inventory data

To calculate COGS, you need the following:

  • Beginning inventory: Your inventory value at the start of the period
  • Purchases: The cost of inventory bought during the period
  • Ending inventory: The value of your remaining inventory at the end of the period

You can get this data from your inventory system, accounting software, or ERP.

Step 2: Apply the COGS formula

Once you have your data, plug the numbers into the COGS formula. Let’s say your business has the following inventory data:

  • Beginning inventory: $7,000
  • Purchases: $4,500
  • Ending inventory: $3,000

The COGS calculation would be:

COGS = $7,000 + $4,500 – $3,000 = $8,500

In this case, COGS shows that during the accounting period, the business sold goods worth $8,500.

Step 3: Inventory methods and their impact on COGS

Your choice of inventory method—for example, FIFO, LIFO, or weighted average—affects how you calculate COGS. These methods determine the cost assigned to your inventory purchases and sales.

The method you choose for inventory accounting also affects your gross profit, tax liability, and overall business decisions. If you understand how inventory methods impact your COGS calculations, you can make more informed decisions about pricing, cost management, and tax strategies.

Example: FIFO method impact

With FIFO (first-in, first-out), the first inventory items purchased are considered the first ones sold. This method is common in businesses where products have a shelf life, such as food or fashion. In periods of rising prices, FIFO results in lower COGS because you sell older, cheaper inventory first.

Let’s assume a business applies FIFO and has the following inventory data:

  • Beginning inventory: 100 units at $10 each = $1,000
  • Purchases: 150 units at $12 each = $1,800
  • Ending inventory: 120 units

The business sold 130 units during the period. With FIFO, you calculate COGS using the oldest inventory first, so the first 100 units sold are valued at $10 each, and the remaining 30 units are valued at $12 each.

COGS = (100 * $10) + (30 * $12) = $1,000 + $360 = $1,360

Example: LIFO method impact

LIFO (last-in, first-out) assumes that you’ll sell the most recently purchased inventory first. During times of inflation, LIFO leads to higher COGS and lower gross profit because you’d sell the more expensive inventory first.

Let’s say the same business uses LIFO and the same inventory data:

  • Beginning inventory: 100 units at $10 each = $1,000
  • Purchases: 150 units at $12 each = $1,800
  • Ending inventory: 120 units

In LIFO, the first 130 units sold are valued at the most recent purchase price of $12 per unit. So:

COGS = (130 * $12) = $1,560

In this case, LIFO results in a COGS of $1,560, which is higher than the FIFO calculation due to the more expensive inventory being sold first.

tip
LIFO can only be used under GAAP in the U.S.

LIFO is not allowed under IFRS (International Financial Reporting Standards). This method is popular in inflationary environments because it minimizes taxable income by increasing COGS, but it may lead to discrepancies when comparing companies across different accounting standards.

Step 4: Interpret the results

The calculated COGS represents the total cost of goods sold during the accounting period, which affects your gross profit and overall profitability. Here's how you interpret it:

  • Higher COGS reduces gross profit, which directly impacts your net income
  • In businesses with fluctuating prices, FIFO or LIFO can have a significant impact on your financial statements, especially when considering the tax implications

How to record a cost of goods sold journal entry

Recording COGS in your books involves making journal entries that reflect the decrease in inventory and the increase in COGS expense. Follow these steps:

1. Verify beginning inventory balance

Before recording, confirm that the beginning inventory balance matches the actual value in your inventory accounts. Any discrepancies will be adjusted through COGS.

2. Accumulate purchases and overhead costs

Track all inventory purchases and overhead costs incurred to make the goods sellable. That helps you maintain proper expense management throughout the process. Record these in your purchases account or directly in your inventory account, depending on your accounting method.

3. Create the journal entry

Data in hand, create the COGS journal entry. It will include a debit to COGS Expense and credits to the Purchases and Inventory accounts. This reflects the inventory decrease and corresponding expense.

COGS journal entry examples

Here are a couple examples of the COGS journal entry types.

Let’s assume:

  • Beginning inventory: $5,000
  • Purchases: $3,000
  • Ending inventory: $2,000

The COGS calculation is:

COGS = $5,000 + $3,000 – $2,000 = $6,000

The journal entry would look like this:

Date

Account

Notes

Debit

Credit

03/31/2025

COGS Expense

Materials sold

$6,000

Purchases

Purchases made

$3,000

Inventory

Inventory reduction

$3,000

Now consider an example where you have additional overhead costs. Suppose:

  • Beginning inventory: $10,000
  • Purchases: $5,000
  • Ending inventory: $3,000
  • Overhead costs: $2,000

First, calculate COGS:

COGS = $10,000 + $5,000 – $3,000 = $12,000

Then, allocate the overhead costs to COGS based on the number of units sold and produce the journal entry:

Date

Account

Notes

Debit

Credit

05/31/2025

COGS Expense

Materials and overhead

$14,000

Purchases

Purchases made

$5,000

Inventory

Inventory reduction

$7,000

COGS vs. operating expenses

The difference between COGS and operating expenses (OpEx) is a key distinction. COGS includes direct costs, such as raw materials, direct labor, and manufacturing costs. These are directly tied to the production of goods.

OpEx includes indirect costs, such as rent, marketing, and administrative salaries. While these expenses are necessary for running your business, they don’t directly contribute to producing your goods. You need to understand the difference to calculate gross margin and manage business expenses effectively.

How COGS impacts financial statements

COGS directly affects both the income statement and the balance sheet, influencing gross profit, net income, and inventory management.

On the income statement, COGS is subtracted from sales revenue to calculate gross profit:

Gross Profit = Sales Revenue – COGS

A higher COGS reduces gross profit and net income, while a lower COGS improves profitability. Monitoring COGS helps businesses make pricing decisions and manage production costs effectively.

COGS reduces the inventory account as goods are sold. The cost of the goods sold is transferred from inventory to COGS expense, lowering current assets and impacting working capital. For example, if COGS is $8,000, the inventory balance decreases by that amount, affecting your company’s liquidity.

Because COGS reduces gross profit, it lowers taxable income. A higher COGS can result in lower taxes, but accurate reporting is essential to avoid issues with tax authorities.

Common COGS mistakes and best practices

Accurately tracking COGS and inventory can be challenging. Here are key errors to watch out for, along with strategies to improve accuracy:

Common mistakes

Misclassifying operating expenses as COGS

This is one of the most common errors. While both types of expenses are necessary to run your business, COGS includes only direct costs related to producing or acquiring goods that are sold. OpEx covers indirect costs like rent, utilities, and administrative salaries. Mixing these up can lead to inaccurate gross profit and net income calculations, ultimately affecting decision-making and tax filings.

Failing to adjust inventory values at the end of the period

Accurate inventory tracking is crucial because it directly impacts the COGS calculation. If inventory is over- or underreported, it will distort your COGS, leading to incorrect gross profit and tax calculations. Regular inventory counts, whether physical or through a perpetual inventory system, help you make sure the numbers reflect the actual goods available.

Best practices

Reconcile inventory regularly

To avoid discrepancies, reconcile inventory regularly. This helps you make sure the values recorded in your inventory accounts match the actual physical inventory on hand. Regular reconciliation—whether monthly, quarterly, or yearly—will help you identify issues such as shrinkage, miscounted items, or incorrect pricing, which can all impact COGS and financial statements.

Use automated accounting software to track COGS and inventory in real time

One of the best ways to improve COGS tracking and inventory management is by using automated accounting software. These tools help track inventory levels in real time, update COGS automatically with each sale, and integrate seamlessly with your financial reporting.

Automation reduces human error, improves accuracy, and ensures real-time insights into your business’s costs and profit margins, making it easier to manage cash flow, taxes, and pricing strategies. It also helps streamline your accounts payable processes.

Record COGS journal entries faster with Ramp Stack

Period-end adjustments are where COGS entries tend to break. You're updating ending inventory and allocating overhead by hand while tying every balance back to the general ledger, often across several spreadsheets. One stale count or misclassified operating expense then carries straight into your gross margin.

With Ramp Stack, you can hand that period-end work to agents that prepare your COGS journal entries and reconciliations for review. Each entry lands in a formula-backed workbook you can open and edit, and the Session Audit Log keeps an exportable record of every step. Nothing syncs to your accounting system until an accountant approves it.

Here's what recording COGS looks like with Stack:

  • Work in the systems you already use: Native connectors for QuickBooks, NetSuite, Sage Intacct, and spreadsheets let agents pull balances from your records.
  • Teach your process once: Skills capture your overhead allocation and expense classification rules in plain English, so agents apply them the same way each period.
  • See the reasoning behind each entry: Agents explain the data behind every output and ask questions when they need your input or judgment.
  • Reconcile inventory more often: Recurring schedules and reconciliations run up to 9x faster, so monthly inventory checks fit inside your close.
  • Get up and running within an hour: You can use Stack on its own without an existing Ramp account—no credit application.

Try Stack for free to see how more than 85,000 businesses are using Ramp to save over a year’s worth of work every hour.

Try Ramp for free
Share with
Tim Stobierski•Contributor Finance Writer
Tim Stobierski is a writer and content strategist focused on the world of finance, investing, software, and other complicated topics. His friends know him as a bit of a nerd. On the side, he writes poetry; his first book of poems, Dancehall, was published by Antrim House Books in July 2023.
Ramp is dedicated to helping businesses of all sizes make informed decisions. We adhere to strict editorial guidelines to ensure that our content meets and maintains our high standards.

FAQs

COGS is subtracted from sales revenue to calculate gross profit. The higher your COGS, the lower your gross profit, which directly impacts your net income and overall profitability.

Different inventory methods, such as FIFO and LIFO, assign different costs to goods sold. FIFO assumes the first purchased items are sold first, resulting in lower COGS in times of rising prices. LIFO assumes the most recently purchased items are sold first, leading to higher COGS.

Accurate COGS reporting reduces your taxable income, which can lower your tax liability. Misreporting COGS can lead to overpaying taxes or triggering audits.

“I assumed I would have to choose between speed and control. What I found is that you can have both. A well-designed system takes friction out, for the finance function and for everyone else.”

Justin Webster

CFO, Denver Broncos

What it takes to pay for an NFL season: inside the Denver Broncos’ finance rebuild

“A well-run district should not have to choose between getting work done at the school site and keeping control of the dollars behind it. We're not hiring more people to do more jobs, so we have to be smarter about the process. With Ramp, the purchase, the receipt, and the record stay together from the start. ”

Nick Brizeno

Director of Purchasing, San Marcos Unified School District

San Marcos Unified gives maintenance teams room to act — and finance a clear record of their spend across 19 schools

“In senior living, scale only works if the communities still feel personal. We needed the back office to carry more of the complexity, not the people serving residents. Ramp helped us build that infrastructure, so the experience in the community could stay human.”

Ryan Cole

CFO, Agemark Senior Living

How the family-owned business behind 28 senior living communities rebuilt finance to close 19 days faster

“AI is moving faster than the finance context around it. Prices change, models change, and the value is not always obvious from an invoice. We needed enough detail to know which bets deserved more investment — and which ones did not.”

Greg Cooley

Controller, AngelList

From purchase requests to 409 API keys: How AngelList puts spend under owner-level control

“Invoices, cards, tokens. The categories change but the principle doesn't: know where the money is going, remove the work around it, and make sure the spend is worth it.”

Maciej Mylik. Finance

ElevenLabs

ElevenLabs speaks more than 70 languages but its money speaks the same one

“We weren’t trying to retrofit an old finance system. We had a blank canvas, and Ramp gave us the foundation to build a global finance function of the future.”

Justin Dourado

Director of Finance, Othership

How Othership’s first finance hires built one operation across Canada and the U.S.

“There's just no surprises anymore. No more waiting two months to find out how a job did. We know how it's doing as it's happening.”

Erich Kuss

Financial Systems Manager, Infinity Home Services

Infinity Home Services prevents the margin leak nobody can see from the ground, so its 20+ local companies build what they bid

“More token spend isn’t proof that AI is working. Less isn’t proof that it isn’t. What matters is whether we’re buying the right level of intelligence for the work. Ramp lets us make that judgment in the same place we manage every other type of spend.”

Cody Nutt

Senior Director of Business Systems, Daxko

How Daxko put every AI token on the same operating system as every dollar