How to Record a Costs of Goods Sold Journal Entry

August 24, 2025
Jason Berwanger
Accounting

Learn how to record a costs of goods sold journal entry with clear steps, examples, and tips for accurate accounting and better business decisions.

COGS journal entry in open notebook.

Every product in your inventory has a financial story. It begins when you purchase it as an asset and ends when a customer buys it, at which point its cost is realized as an expense. The official record of this final chapter is the costs of goods sold journal entry. This simple transaction is fundamental to accurate financial reporting, as it directly separates your revenue from the costs required to earn it. Mastering this process is the first step toward gaining true visibility into your product-level profitability. This guide will show you how to create these entries correctly, ensuring the financial story your books tell is both complete and accurate.

HubiFi CTA Button

Key Takeaways

  • Distinguish COGS from operating expenses to measure true profitability: COGS covers direct production costs like materials and factory labor, while OpEx covers general business costs like marketing and rent. Separating them is the only way to accurately calculate your gross profit and understand your production efficiency.
  • Choose a consistent inventory method for accurate reporting: Whether you use FIFO, LIFO, or weighted-average, sticking to one method is crucial for reliable financial statements and tax compliance. This consistency ensures you can compare performance accurately over time.
  • Analyze COGS trends to make smarter business decisions: Your COGS data is more than just a number for your income statement. Use it to track your gross profit margin, evaluate product profitability, and inform your pricing and inventory strategies.

What is the Cost of Goods Sold (COGS)?

Let's talk about a crucial line on your income statement: the Cost of Goods Sold, or COGS. Simply put, COGS represents all the direct costs of creating the products you sell. Think of it as the price tag for producing your inventory. If you sell physical goods, understanding COGS is fundamental to your financial health. It’s a core metric that reveals how efficiently your business turns raw materials into revenue, setting the stage for true profitability.

What's Included in COGS?

So, what exactly gets bundled into this number? The key word here is direct. COGS includes any expense directly tied to producing your goods—costs you wouldn't have if you didn't make that specific item. This covers the raw materials, the cost to ship those materials to your facility, and any parts consumed during production. It also includes the wages for the labor force who are hands-on in making the product. Even the packaging costs for getting an item ready for sale fall under this umbrella. For a furniture maker, this would be the wood, screws, paint, and the carpenter's salary.

What's Not Included in COGS?

Just as important as knowing what to include is knowing what to leave out. COGS does not include indirect costs, which are the general expenses of running your business. For example, the cost of shipping the final product to your customer is a selling expense, not COGS. Other common exclusions are rent for your factory, the electricity bill, or the salaries of your marketing team and administrative staff. These are all essential, but they fall under the category of Operating Expenses (OpEx), which are accounted for separately. Keeping these costs distinct gives you a much clearer view of your production efficiency.

How COGS Affects Your Profitability

Here’s why getting COGS right is so critical: it directly impacts your bottom line. On your income statement, you subtract COGS from your total revenue to calculate your gross profit. This figure shows how much money you’re making from sales before accounting for other business expenses. If your COGS is too high, your gross profit shrinks, which affects your overall net income. For most product-based businesses, COGS is the single largest expense. Accurately tracking it isn't just about compliance; it’s about having the real-time analytics you need to set the right prices, manage inventory, and make strategic decisions that protect your margins.

How to Calculate Your COGS

Calculating your Cost of Goods Sold is essential for understanding your company’s profitability. While the concept is straightforward—it’s the direct cost of producing the goods you sell—the calculation involves a few key decisions. Getting this number right is crucial because it directly impacts your gross profit and, ultimately, your tax bill.

Think of the COGS calculation as a simple story of your inventory over a specific period, like a month or a quarter. You start with what you had, add what you bought, and subtract what you have left. The result tells you the cost of the items that walked out the door with your customers. Let's walk through the formula and the different methods you can use to make sure your numbers are accurate and consistent.

Breaking Down the COGS Formula

The classic formula for calculating COGS is simple and effective: Beginning Inventory + Purchases – Ending Inventory = COGS. It’s a fundamental piece of accounting that helps you see exactly what it cost to generate your sales.

Here’s what each part means:

  • Beginning Inventory: This is the value of all the inventory you had on hand at the start of the accounting period. It’s the same number as your ending inventory from the previous period.
  • Purchases: This includes all the costs of inventory you bought or produced during the period.
  • Ending Inventory: This is the value of the inventory you have left at the end of the period.

For example, if you started with $10,000 in inventory, purchased $5,000 more, and ended with $7,000, your COGS would be $8,000 ($10,000 + $5,000 - $7,000). This is the cost of goods sold journal entry you'd record in your books.

Choose Your Inventory Method: FIFO, LIFO, or Weighted Average

The value of your inventory can change over time, so you need to decide on a method for how you account for it. The inventory valuation method you choose directly affects your COGS calculation.

Here are the three main approaches:

  • FIFO (First-In, First-Out): This method assumes that the first items you purchased are the first ones you sold. It’s a logical choice for businesses selling perishable goods, like food.
  • LIFO (Last-In, First-Out): This assumes the most recently purchased items are sold first. During times of rising prices, this can result in a higher COGS and lower taxable income.
  • Weighted-Average Cost: This method uses the weighted average of all inventory purchased during the period to determine the value of goods sold. It smooths out price fluctuations.

Choose one method and stick with it for consistency in your financial reporting.

Periodic vs. Perpetual Inventory Systems

How you track your inventory also plays a big role in calculating COGS. Businesses typically use one of two systems. A periodic inventory system involves physically counting your inventory at the end of an accounting period to determine your ending inventory and COGS. It’s simpler but provides less timely information.

A perpetual inventory system, on the other hand, continuously updates your inventory levels and COGS in real-time as each sale occurs. This approach gives you a much more accurate, up-to-the-minute view of your profitability and is the standard for high-volume businesses that need to record the cost of goods sold accurately and efficiently. Automated systems are key to making a perpetual system work without manual headaches.

How COGS Impacts Your Taxes

Your COGS calculation isn't just an internal metric—it has a major impact on your tax liability. COGS is subtracted from your total revenue to calculate your gross profit. Your gross profit is a key component in determining your net income, which is the figure your income taxes are based on.

A higher COGS leads to a lower gross profit and, therefore, a lower taxable income. This makes accurate COGS reporting absolutely critical. If you miscalculate and overstate your COGS, you might underpay your taxes and risk an audit. If you understate it, you’ll end up paying more in taxes than you need to. Getting this right ensures you stay compliant and avoid common COGS accounting mistakes that could cause trouble down the line.

COGS vs. Operating Expenses: What's the Difference?

Understanding the difference between the Cost of Goods Sold (COGS) and operating expenses (OpEx) is fundamental to getting a clear picture of your company’s financial health. Think of it this way: COGS are the costs you incur to create your product, while operating expenses are the costs you incur to run your business. For a coffee shop, the coffee beans and milk are COGS. The salary for your marketing manager and the rent for your storefront are operating expenses.

This isn't just accounting jargon; it's a critical distinction that impacts how you measure profitability. Separating these two categories allows you to see how profitable your actual products are before you even account for general business costs. Getting this right is non-negotiable for accurate financial reporting, smart pricing strategies, and making sound business decisions. It’s the first step in truly understanding where your money is going and how efficiently your business is performing. Without this clarity, you might think a product line is a winner when, in reality, its production costs are eating away at your bottom line. This separation is what allows you to calculate key metrics like gross profit margin, which is a vital indicator of your production efficiency and pricing power.

How to Tell Them Apart

The easiest way to distinguish between COGS and OpEx is to ask one simple question: "Would this cost exist if I didn't produce anything?" If the answer is no, it’s likely COGS. These are your direct costs, like the raw materials used to make a product and the wages of the workers on the assembly line. These expenses go up and down with your production volume.

Operating expenses, on the other hand, are the indirect costs required to keep your doors open, regardless of how many units you sell. This category includes things like rent for your office, utility bills, marketing campaign costs, and salaries for your administrative and sales staff. These costs support the entire business, not just the creation of a single product.

Common Classification Mistakes to Avoid

It’s easy to get tripped up when classifying costs, but a few common mistakes pop up time and again. One of the biggest is miscategorizing labor. For example, the salary of a factory floor manager is part of COGS (as factory overhead), but the salary of your HR manager is an operating expense. Another frequent error involves shipping costs. The cost to ship raw materials to your facility is part of COGS, but the cost to ship the final product to a customer is typically a selling expense, which falls under OpEx.

Inaccurate inventory tracking can also throw your COGS calculation way off. When your systems aren't connected, it's easy for these errors to slip through, skewing your profit margins and leading to poor decisions. Using integrated platforms can help ensure your data is accurate and your classifications are correct.

How They Appear on Financial Statements

On your income statement, COGS and operating expenses live in different neighborhoods, and their placement tells a story. Revenue sits at the very top. Right below it, you subtract COGS to find your Gross Profit. This number is powerful—it shows you how much money you’re making from selling your products, before any other expenses are considered. It’s a direct measure of your production efficiency.

After calculating gross profit, you then subtract all of your operating expenses (often grouped into categories like "Selling, General & Administrative"). This gives you your Operating Income, which reflects the profitability of your core business operations. This clear separation helps you and any potential investors analyze different parts of your business performance independently. You can find more financial deep dives on our HubiFi blog.

Create Your First COGS Journal Entries

Recording your Cost of Goods Sold is a fundamental part of managing your business finances. While the term "journal entry" might sound like something straight out of an accounting textbook, it's really just the formal way of recording a transaction. Getting these entries right is crucial for accurate financial statements and a clear picture of your profitability. Think of it as telling the financial story of your products—from the moment you acquire them to the moment you sell them.

The process follows a clear logic based on the principles of double-entry bookkeeping. Every transaction affects at least two accounts, keeping your books perfectly balanced. Once you understand the basic flow, you'll find it's a repeatable process you can apply to every sale you make. Let's walk through exactly how to create these entries, what information you'll need, and how each step impacts your financial records. With a solid process, you can ensure your data is always accurate and ready for analysis, which is a cornerstone of making smart business decisions.

A Quick Refresher on Debits and Credits

Before we build the journal entry, let's quickly review the two main components: debits and credits. In accounting, every financial transaction is recorded as a "journal entry." Each entry must have at least one debit and one credit, and the total amount of the debits must equal the total amount of the credits. This is what keeps your books balanced.

Think of it this way: a debit is an entry on the left side of an account ledger, and a credit is on the right. Debits increase asset and expense accounts, while credits increase liability, equity, and revenue accounts. It’s a system of checks and balances that ensures every dollar is accounted for, providing a reliable foundation for all your financial reporting.

Journal Entries for Purchases

When you buy products to sell, you need to record them as inventory, which is an asset for your business. You aren't recording an expense yet because you haven't sold the item. The journal entry for a purchase is straightforward.

Let's say you buy $1,000 worth of inventory. You would debit your Inventory account to show that your assets have increased. Then, you would credit either your Cash account (if you paid immediately) or your Accounts Payable account (if you bought it on credit). This entry shows that you've acquired new assets and either spent cash or taken on a short-term liability to do so.

Example:

  • Debit: Inventory $1,000
  • Credit: Cash / Accounts Payable $1,000

Journal Entries for Sales

When you sell a product, you need to make two separate journal entries. The first records the revenue from the sale, and the second records the cost of that product (your COGS) and removes it from your inventory.

Imagine you sell a product for $150 that cost you $90. First, you’ll record the sale by debiting Cash or Accounts Receivable for $150 and crediting Sales Revenue for $150. This shows the money coming into your business. Next, you’ll record the COGS by debiting the COGS expense account for $90 and crediting your Inventory account for $90. This second entry moves the cost of the item from an asset to an expense.

Example:

  1. To record revenue:

    • Debit: Cash / Accounts Receivable $150
    • Credit: Sales Revenue $150
  2. To record COGS:

    • Debit: Cost of Goods Sold $90
    • Credit: Inventory $90

What Documentation You'll Need

To make accurate journal entries, you need to have your information organized. Before you sit down to do your books, gather all the relevant documents related to your inventory and sales. This includes supplier invoices, purchase orders, freight bills for shipping costs, and sales receipts. Having these on hand makes the process much smoother and ensures your numbers are backed by solid proof.

You’ll also need your beginning inventory value, the total cost of new inventory purchased during the period, and your ending inventory count. Many businesses simplify this by using software that offers seamless data integrations, which helps pull all this information together automatically and reduces the chance of manual error.

Handle More Complex COGS Journal Entries

Once you have the basics down, you’ll find that COGS can get a little more complicated in practice. Your business model, customer behavior, and even the time of year can introduce new variables into your calculations. Don’t worry—these situations are completely manageable. Let’s walk through some of the most common complex scenarios and how to handle their journal entries with confidence.

For Manufacturing Businesses

If you make your own products, calculating COGS involves more than just the cost of a finished item. You need to account for all the direct costs that go into production. This includes the price of raw materials, the wages for the workers who assemble the products, and any other factory overhead directly tied to manufacturing. For example, the salary of a factory supervisor is part of COGS, but the salary of your marketing manager is not. Tracking these different cost components requires meticulous record-keeping to ensure you’re accurately capturing the true cost of producing the goods you sell.

For Retail Businesses

For retailers and ecommerce stores, the biggest challenge is often timing. A common mistake is to record the entire cost of a bulk inventory purchase as COGS right away. Instead, you should only record the cost of an item when you sell it. This is based on the "matching principle," a fundamental accounting concept that says expenses should be recorded in the same period as the revenue they helped generate. This ensures your financial statements give a true picture of your profitability for a specific period, like a month or a quarter. It prevents you from understating your profit in the period you buy inventory and overstating it later.

How to Manage Returns and Adjustments

Customer returns are a normal part of doing business, but they require you to adjust your books. When a customer returns an item, you need to reverse both the sale and the COGS journal entry. This means adding the item back to your inventory account and subtracting its cost from your COGS account. Things like shipping delays or damaged goods also require adjustments to keep your inventory and COGS numbers accurate. Having seamless data integrations between your sales platform and accounting software is key to managing these changes without creating a huge headache.

Making Year-End Closing Entries

At the end of an accounting period, you’ll make closing entries to finalize your COGS calculation. This process involves taking your beginning inventory, adding all the inventory purchases you made during the period, and then subtracting your ending inventory. The result is your final COGS for that period. Getting this number right is critical because it directly impacts your gross profit and, ultimately, your net income. An accurate COGS calculation is a key indicator of your company's financial health and is essential for tax reporting and making smart strategic decisions for the year ahead.

Best Practices for Managing COGS

Calculating your COGS is one thing, but managing it effectively is what sets successful businesses apart. Strong COGS management isn't just about getting the numbers right for tax season; it's about creating a reliable financial picture that helps you make smarter decisions year-round. By establishing clear, consistent processes, you can avoid costly errors, streamline your operations, and gain deeper insights into your profitability. Here are four essential practices to keep your COGS accounting sharp and accurate.

Stay Consistent with Your Methods

Consistency is your best friend in accounting. Once you choose an inventory valuation method—whether it’s FIFO, LIFO, or weighted average—stick with it. Switching methods can skew your financial data, making it difficult to compare performance across different periods and raising red flags for auditors. It's also vital to be consistent about what costs you include. A common mistake is misinterpreting which expenses are direct costs. As a rule, you must ensure that COGS includes only costs directly attributable to producing your goods. This discipline ensures your financial reporting is both accurate and compliant, creating a stable foundation for all your financial analysis.

Keep Your Documentation in Order

Think of your documentation as the evidence that backs up your numbers. Every figure in your COGS calculation should be supported by a paper trail, including supplier invoices, purchase orders, and shipping receipts. Failing to keep accurate records can lead to significant discrepancies in your calculations, which can affect your financial reporting and tax obligations. Keep everything organized, whether you use a digital filing system or physical folders. This habit will save you countless hours of stress during tax time or an audit. Having well-organized data also makes it easier to integrate your systems and automate parts of your accounting process, giving you a clearer view of your finances.

Set Up Internal Controls

Internal controls are the specific rules and procedures you put in place to protect your assets and ensure your financial records are accurate. They’re your first line of defense against errors and fraud. Implementing these controls can help prevent the misclassification of expenses, ensuring that only appropriate costs are recorded as COGS. For example, you might require manager approval for all inventory purchases over a certain amount or separate the duties of the person who orders inventory from the person who receives it. These simple checks and balances create accountability and reduce the risk of costly mistakes, giving you more confidence in your financial data.

Reconcile Your Accounts Regularly

Don't wait until the end of the year to check if your books match reality. Regular reconciliation of accounts is crucial to ensure that your inventory records match the COGS you've reported. This means physically counting your inventory and comparing it to what your accounting system says you have. Performing this check monthly or quarterly helps you spot discrepancies early, whether they’re caused by theft, damage, or simple data entry errors. Catching these issues quickly prevents them from snowballing into bigger problems that could distort your financial statements and lead to poor business decisions. It’s a fundamental step in maintaining accurate financial records.

Automate Your COGS Process

Once you have a handle on the manual process, you’ll quickly see its limitations. Tracking COGS by hand is time-consuming and leaves too much room for error, especially as your sales volume grows. Automation is the key to getting accurate, timely data without spending hours buried in spreadsheets. By automating your COGS process, you can streamline your accounting, reduce mistakes, and free up your team to focus on strategic growth instead of manual data entry. It’s about working smarter, not harder, to get the financial clarity you need.

Find the Right Software

If you’re still relying on spreadsheets to track COGS, you’re likely dealing with disconnected data and a lot of manual work. The right software can change that. Using a single, central system for financial data makes COGS tracking much easier and more accurate, helping you understand your true financial picture at any given time. Look for a solution that acts as a central hub for all your financial information. The best platforms offer seamless integrations with the tools you already use, like your accounting software, ERP, and CRM. This ensures all your data flows into one place, giving you a complete and reliable view of your costs.

The Benefits of Real-Time Tracking

When you calculate COGS only at the end of the month or quarter, you’re always looking in the rearview mirror. Accurate and real-time COGS reporting is crucial because it helps you make smart decisions about pricing, operational efficiency, and your overall business plans. With up-to-the-minute data, you can spot trends as they happen, adjust your pricing strategy on the fly, and manage inventory more effectively. Instead of waiting weeks to see how profitable a product is, you can know in an instant. If you want to see how real-time data can transform your financial operations, you can schedule a demo to see it in action.

Why Data Integration Matters

Calculating COGS can get very complicated, especially if your company uses many different spreadsheets and data sources. It's hard to track changes like returns, shipping fees, or payment processor fees without having all your financial data in one place. When your sales, inventory, and expense data are siloed, you’re forced to piece together information manually, which is a recipe for errors and wasted time. An integrated system pulls data from all your sources automatically, creating a single source of truth. This means your COGS calculation is always based on complete and current information, reflecting the true cost of every sale.

Use Tools to Stay Compliant

Correctly calculating COGS in every accounting period is essential because it's a key indicator of your company's financial health. If this figure is off, it can be a major concern for managers, investors, and auditors. Automation tools are your best defense against the human errors that can lead to compliance issues. By standardizing the calculation process, these platforms ensure your numbers are consistent and accurate every time. This not only prepares you for a smooth audit but also gives stakeholders confidence in your financial reporting. You can find more insights on maintaining financial health and compliance on our blog.

Report and Analyze Your COGS

Once you’ve recorded your COGS journal entries, the real work begins. Calculating these numbers is just the first step; the true value comes from using this data to understand your business's performance. Reporting and analyzing your COGS helps you see the bigger picture, moving you from simply tracking expenses to making strategic decisions that drive growth. When you consistently review these figures, you can spot trends, identify inefficiencies, and find new opportunities to improve your bottom line. This process turns your accounting data from a historical record into a forward-looking tool for managing your business effectively.

See the Impact on Your Financials

Your Cost of Goods Sold has a direct and significant impact on your company’s profitability, and its primary home is on your income statement. This key financial report lays out your profits and losses over a specific period. To find your gross profit, you simply subtract COGS from your total revenue. This number is incredibly revealing—it tells you how much profit you make on your products before accounting for other operating expenses. Think of gross profit as a measure of your production efficiency. A healthy gross profit shows that you’re effectively managing the costs of labor and materials needed to create what you sell.

Track Key Performance Metrics

Knowing your COGS allows you to track essential performance metrics that paint a clear picture of your financial health. One of the most important is the gross profit margin, calculated by dividing your gross profit by your revenue. This percentage shows how much profit you keep from every dollar of sales. Tracking this metric over time is critical. Is it stable, increasing, or decreasing? A declining margin could be a red flag, signaling that your material costs are rising or that you need to adjust your pricing strategy. Consistently monitoring these key performance indicators helps you understand your business’s core profitability and make adjustments before small issues become major problems.

Prepare for a Smooth Audit

For any business, the word "audit" can be stressful, but solid COGS reporting can make the process much smoother. Auditors will pay close attention to how you calculate COGS and value your inventory. They’ll want to see that your methods are consistent and your records are accurate. This is where having a reliable system in place becomes invaluable. Accurate, real-time COGS reporting not only satisfies auditors but also demonstrates strong internal controls. When your financial data is clean, organized, and readily available, you can confidently pass audits and ensure your business remains compliant. This level of accuracy is exactly what automated revenue recognition systems are designed to provide.

Use COGS Data to Make Better Decisions

Ultimately, the goal of tracking COGS is to make smarter, data-driven decisions for your business. When you have a firm grasp on your cost data, you can confidently address critical questions. Is a certain product profitable enough, or are its production costs eating away at your margins? Should you find a less expensive supplier or increase your prices? Analyzing COGS trends helps you optimize your pricing, manage inventory more effectively, and improve operational efficiency. This information is fundamental to your overall business strategy, guiding everything from product development to marketing budgets. With clear visibility into your costs, you can stop guessing and start making choices that lead to sustainable growth.

Related Articles

HubiFi CTA Button

Frequently Asked Questions

I run a service-based business. Do I still have a Cost of Goods Sold? That's a great question. While the term "Cost of Goods Sold" is traditionally for businesses selling physical products, service-based businesses have a similar concept often called "Cost of Revenue" or "Cost of Services." This includes the direct costs of providing your service, such as the salaries of the employees who perform the service or the cost of software directly used to serve a client. The principle is the same: you're isolating the direct costs of generating revenue from your general operating expenses.

How often should I be calculating my COGS? Ideally, you should know your COGS in real-time. Businesses that use a perpetual inventory system can do this, as their COGS is updated with every single sale. This gives you the most accurate, up-to-the-minute view of your profitability. If you're using a periodic system, you'll calculate it at the end of each accounting period, like monthly or quarterly. The more frequently you calculate it, the faster you can spot trends and make informed decisions about pricing and inventory.

What's the most common mistake you see businesses make with COGS? One of the most frequent errors is misclassifying expenses. It's easy to accidentally include an indirect cost, like marketing or office rent, in your COGS calculation. This throws off your gross profit and gives you a misleading picture of your production efficiency. Another common mistake is simply being inconsistent with the chosen inventory valuation method, which can make it difficult to compare your performance from one period to the next.

Why can't I just lump all my business expenses together? Separating COGS from your other operating expenses is essential because it allows you to calculate your gross profit. This single number tells you how profitable your products are on their own, before considering general business costs. It helps you answer critical questions like whether your pricing is correct or if your production costs are too high. Without that separation, you lose valuable insight into the core health of your business model.

Is it okay to switch between FIFO and LIFO inventory methods? You should avoid switching your inventory valuation method if you can. Consistency is key in accounting because it ensures you can make meaningful comparisons of your financial performance over time. If you change from FIFO to LIFO, for example, your COGS and gross profit could look very different, even if your sales and costs haven't changed. If you do need to make a change, you must disclose it in your financial statements and explain the reason why.

Jason Berwanger

Former Root, EVP of Finance/Data at multiple FinTech startups

Jason Kyle Berwanger: An accomplished two-time entrepreneur, polyglot in finance, data & tech with 15 years of expertise. Builder, practitioner, leader—pioneering multiple ERP implementations and data solutions. Catalyst behind a 6% gross margin improvement with a sub-90-day IPO at Root insurance, powered by his vision & platform. Having held virtually every role from accountant to finance systems to finance exec, he brings a rare and noteworthy perspective in rethinking the finance tooling landscape.