June 5, 2025

How to record cost of goods sold: COGS journal entry

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.

Simplify your COGS accounting with Ramp

Accurately tracking COGS helps you make informed pricing decisions and ensures tax compliance. Ramp's modern finance operations platform streamlines this process, reducing manual errors and saving time.

Ramp empowers you to capture, categorize, and monitor all of your business’s expenses—including those that go into COGS—with greater accuracy and speed than possible through manual processes. Direct integrations with popular ERPs and accounting software sync every transaction in real time, giving you a clear and accurate record of all the factors that make up your COGS.

Successful finance teams leverage the power of automation to ensure consistent, accurate reporting, ultimately making it easier to maintain profitability and optimize pricing. Learn more about how Ramp’s accounting automation software can help you save time and money.

Try Ramp for free
Share with
Tim StobierskiContributor 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

We’ve simplified our workflows while improving accuracy, and we are faster in closing with the help of automation. We could not have achieved this without the solutions Ramp brought to the table.

Kaustubh Khandelwal

VP of Finance, Poshmark

Poshmark

Our previous bill pay process probably took a good 10 hours per AP batch. Now it just takes a couple of minutes between getting an invoice entered, approved, and processed.

Jason Hershey

VP of Finance and Accounting, Hospital Association of Oregon

Hospital Association of Oregon

When looking for a procure-to-pay solution we wanted to make everyone’s life easier. We wanted a one-click type of solution, and that’s what we’ve achieved with Ramp.

Mandy Mobley

Finance Invoice & Expense Coordinator, Crossings Community Church

Crossings Community Church

We no longer have to comb through expense records for the whole month — having everything in one spot has been really convenient. Ramp's made things more streamlined and easy for us to stay on top of. It's been a night and day difference.

Fahem Islam

Accounting Associate, Snapdocs

Snapdocs

It's great to be able to park our operating cash in the Ramp Business Account where it earns an actual return and then also pay the bills from that account to maximize float.

Mike Rizzo

Accounting Manager, MakeStickers

Makestickers

The practice managers love Ramp, it allows them to keep some agency for paying practice expenses. They like that they can instantaneously attach receipts at the time of transaction, and that they can text back-and-forth with the automated system. We've gotten a lot of good feedback from users.

Greg Finn

Director of FP&A, Align ENTA

Align ENTA

The reason I've been such a super fan of Ramp is the product velocity. Not only is it incredibly beneficial to the user, it’s also something that gives me confidence in your ability to continue to pull away from other products.

Tyler Bliha

CEO, Abode

Abode