QuickBooks Blog
An illustration of a shopping basket and a price tag.
Bookkeeping

Cost of goods sold: How to calculate + free calculation tool


Key takeaways:

  • The Cost of Goods Sold (COGS) is the direct expense of producing or purchasing the items a business sells.
  • There are three primary methods for valuing inventory for COGS: FIFO, LIFO, and the average cost method.
  • COGS is reported as an expense on an income statement and is a tax-deductible expense that lowers a business's taxable income.


If your business sells products, one of the most important figures on your financial statements is the cost of goods sold (COGS). It’s key to accurately estimating your business's profitability and keeping up with the economy.

According to a recent QuickBooks survey, rising costs are the single greatest challenge for nearly half of all small businesses (46%).

Getting a clear picture of your COGS is the first step toward controlling those expenses and setting a pricing strategy that ensures you're not just busy, but profitable.

Whether you're selling handmade goods, running a retail shop, or managing a manufacturing operation, you need a reliable way to track your costs. Let's discuss what COGS is, how it works, and how you can use it to better manage your business finances.

Jump to:

What is the cost of goods sold?

The cost of goods sold (COGS) represents the direct expenses incurred in producing an item or delivering a service that a company sells. To determine the cost of goods sold, you need to consider expenses like materials, labor, and overhead directly associated with the production process.

Cost of goods sold calculator

Our free Cost of Goods Sold calculator is an easy-to-use tool that can help you quickly figure out your COGS for a specific period.

Simply plug in your beginning inventory, additional inventory costs, and ending inventory in the fields below—the calculator will do the rest.

Once you determine the cost of goods sold, you can also determine how much you owe in taxes at the end of the reporting period—usually 12 months. Then, you can figure out your annual profits by subtracting the annual cost of goods sold from your annual revenue.

COGS can also help you choose the value of your inventory for calculating business assets. Note that other inventory costing factors may influence your overall COGS. The IRS refers to these methods as “first in, first out” (FIFO), “last in, first out” (LIFO), and average cost.

What is the formula for the cost of goods sold?

Profit is the key to success for any small business. If you’re a manufacturer, you need to know your cost of goods sold and how to calculate it to determine if your business is profitable. The formula for calculating COGS is:

Beginning Inventory + Additional Inventory Costs - Ending Inventory = COGS

How to calculate cost of goods sold.

How do you calculate the cost of goods sold?

You can calculate your COGS using the formula listed below—and it only takes five simple steps. You can just use our Cost of Goods Sold Calculator or follow the steps below to calculate it manually:

  1. Identify both direct and indirect costs. Direct costs are specifically associated with the production of your goods, including materials and labor costs for manufacturing staff. Indirect costs may include salaries for other staff such as warehouse personnel, as well as expenses for equipment, rent, and similar overheads.
  2. Calculate your initial inventory, which includes all stock, raw materials, and finished products on hand. This amount should match the ending inventory noted in your last financial statements.
  3. Account for all purchases made during the financial period. It's crucial to maintain thorough records and keep all related invoices from this period.
  4. Determine your ending inventory by physically inspecting the remaining goods. Exclude any items that are damaged or obsolete, provided you have documentation to support their exclusion.
  5. Using the data gathered from the previous steps, calculate your COGS.

Some businesses are now using AI accounting agents to streamline this process. Agents automate expense tracking and classification, making it easier to accurately calculate the cost of goods sold (even if those "goods" are services). 

Introducing Intuit Assist

Get paid 5 days faster on average when you send invoice reminders with Intuit Assist, an AI-powered assistant right in QuickBooks.

Why is the cost of goods important?

The cost of goods sold is an essential financial metric for any business that sells goods, whether manufactured or purchased. This key figure serves multiple critical purposes in business management, including:

  1. Calculates the actual cost of merchandise sold: COGS helps businesses determine the actual expenses involved in producing or purchasing the goods they sell. This calculation includes direct costs such as materials and labor, and it's vital for understanding what each unit sold actually costs the company.
  2. Assesses profitability: By subtracting COGS from sales revenue, businesses can calculate their gross profit. This figure is fundamental for assessing the profitability of products or services, helping companies to understand which items are contributing most to the bottom line and which may be costing more than they bring in.
  3. Monitors business performance: COGS is a key metric in financial analysis and business performance monitoring. By tracking changes in COGS relative to sales over time, management can identify trends, control costs, and make informed decisions about production, pricing, and inventory management.
  4. Supports pricing strategy: Understanding COGS enables businesses to set prices that cover all production costs while ensuring a profit margin. This is crucial for remaining competitive in the market while also sustaining the business financially.
  5. Inventory management: Effective inventory management relies on a clear understanding of COGS. Businesses use this information to decide how much stock to keep on hand, which products to reorder, and which may need to be discontinued based on cost-effectiveness and sales performance.
  6. Tax reporting: COGS is a deductible business expense that can significantly impact the taxable income reported by a company. Accurate calculation and reporting of COGS are essential for tax compliance and can help businesses maximize their tax benefits.

Cost of sales vs cost of goods sold: What’s the difference? 

The cost of goods sold and cost of sales refer to the same calculation. Both determine how much a company spends to produce its sold goods or services. "Cost of sales is more common in service-based businesses, as cost can be harder to quantify, while COGS is typically used by businesses that sell physical products. 

What is included in the cost of goods sold?

The cost of goods sold is a specific accounting term that only includes the direct costs of production. Here is a breakdown of the expenses that belong in your COGS calculation… and those that do not.

The cost of goods sold may include: 

These are the expenses that are directly tied to making your product or delivering your service.

  • Materials used to create a product or perform a service.
  • Labor needed to make a product or perform a service.
  • Overhead costs directly related to production (for example, the cost of electricity to run an assembly line).

The cost of goods sold excludes:

Even if these expenses support your business, they don't qualify as direct production costs and should be recorded separately.

  • Indirect expenses (for example, distribution or marketing).
  • Overhead costs associated with general business operations.
  • The cost of creating unsold inventory or services.

What is the difference between COGS vs. cost accounting?

Unlike COGS, cost accounting is a broader approach that includes both direct and indirect costs associated with producing a product. This method provides a more comprehensive view of the total expenses involved in running a business. 

Cost accounting allows for better allocation of overhead costs, a deeper understanding of profit margins, and more informed strategic planning. It helps managers understand the profitability of individual products or services in the context of the company's overall financial performance.

How do you calculate the cost of goods sold in a service business?

Some service companies may record the cost of goods sold as related to their services. But other service companies—sometimes known as pure service companies—will not record COGS at all. The difference is that some service companies do not have any goods to sell, nor do they have inventory.

Examples of service companies that do have inventory:

Some service-based businesses also sell physical goods or materials as part of their operations. These companies typically carry inventory that supports or complements their main service.

  • Construction
  • Plumbing and electrical
  • Repair and installation
  • Mining and manufacturing
  • Transportation and lodging

For example, a plumber offers plumbing services but may also have inventory on hand to sell, such as spare parts or pipes. To calculate COGS, the plumber must combine the cost of labor with the cost of each part involved in the service.

Or picture a bed and breakfast. Its primary service doesn’t require the sale of goods, but the business might still sell merchandise, such as snacks, toiletries, or souvenirs.

Examples of pure service companies that do not have inventory:

Other service companies don’t rely on physical products at all. Their value comes entirely from their time, expertise, or specialized skills—so inventory and COGS don’t apply.

  • Accounting firms
  • Law offices
  • Doctors
  • Dancers
  • Real estate appraisers or firms
  • Business consultants

Pure service companies may calculate “cost of services” or “cost of revenue.” COGS is not on their income statement.

The formula for calculating the Cost of Services 

To calculate the Cost of Services for a service-based business, you'll add the Direct Labor Costs, the Direct Materials Used, and the Direct Overhead Costs. 

This formula helps service businesses, like plumbing companies, determine the total direct expenses incurred while delivering their services (similar to how a product-based business calculates its COGS).

Cost of Services = 

Direct Labor Costs + Direct Materials Used + Direct Overhead Cost

Here's how it works: 

  1. Direct Labor Costs: Calculate the total wages paid to employees directly involved in providing services. Include salaries, wages, and related benefits.
  2. Direct Materials Used: Add up the costs of any materials that are consumed directly in the delivery of services.
  3. Direct Overhead Costs: Include any overhead costs directly attributable to service delivery, such as utilities for the service area or depreciation of tools and equipment used.
An image showing how to calculate the cost of services in a service-based business.

Combining these numbers determines the total cost of services for your service business. This will help you understand the direct costs of providing your services and assess the profitability of your business operations.

Why is tracking cost important?

Cost tracking is essential in calculating the correct profit margin of an item. Your profit margin is the percentage of profit you keep from each sale. Understanding your profit margins can help you determine whether or not your products are priced correctly and if your business is making money.

Beyond that, tracking accurate costs of your inventory helps you calculate your true inventory value, or the total dollar value of inventory you have in stock. In most cases, your inventory is your most significant business asset. Understanding your inventory valuation helps you calculate your cost of goods sold and your business's profitability.

When tax time rolls around, you can include the cost of purchasing inventory on your tax return, which could reduce your business’s taxable income. Knowing your initial costs and maintaining accurate product costs can ultimately save you money.

Intuit Assist: A faster way to more money

Get paid 45% faster when you send invoice reminders with Intuit Assist.

5 common limitations of COGS

While COGS is a financial metric used by companies to determine the direct costs associated with the production of the goods they sell, it has certain limitations compared to more comprehensive cost accounting methods. Understanding these limitations helps clarify why COGS alone may not provide a complete picture of a company's financial health or operational efficiency.

1. Focus on direct costs only

COGS includes only the direct costs of producing goods, such as raw materials and direct labor. This focus excludes indirect costs like overhead, administrative expenses, and marketing costs. While this provides clarity on the direct profitability of products, it omits significant expenses that can affect the overall profitability of the company.

2. Impact on profitability is not fully clear

Since COGS does not account for all operating expenses, the gross profit (revenue minus COGS) might give an inflated view of profitability. Without considering expenses like marketing, R&D, and administration, businesses might not have an accurate measure of how profitable their operations truly are, potentially leading to skewed financial decision-making.

3. Fluctuations across periods

COGS can vary significantly from one period to another due to changes in raw material costs, manufacturing efficiency, and production volume. Such fluctuations make it difficult to predict future financial performance based purely on COGS. This variability can lead to challenges in budgeting and financial planning, as sudden increases in costs might not immediately correlate with increases in sales.

4. Exclusion of other expenses

Operational costs such as marketing, sales force expenses, and after-sales support are not included in COGS. These costs can be substantial and are vital for driving sales and supporting the product's market position. By not including these costs, COGS overlooks essential aspects of the total cost of delivering a product to market.

5. Limited usefulness in service industries

In service-oriented businesses, where direct costs of services (like labor) may not be as clearly definable as in manufacturing, COGS becomes a less effective metric. In these cases, comprehensive cost accounting methods that can allocate overhead and administrative costs more accurately are more informative.

The three inventory costing methods

The IRS requires businesses that produce, purchase, or sell merchandise for income to calculate the cost of their inventory. Depending on the business’s size, type of business license, and inventory valuation, the IRS may require a specific inventory costing method.

However, once a business chooses a costing method, it should remain consistent with that method year over year. Consistency helps businesses stay compliant with generally accepted accounting principles (GAAP).

The IRS explains costing methods in Publication 538. If an item has an easily identifiable cost, the business may use the average costing method. However, some items’ cost may not be easily identified or may be too closely intermingled, such as when making bulk batches of items.

In these cases, the IRS recommends either FIFO or LIFO costing methods.

An image showing the difference between LIFO and FIFO.

First in, first out (FIFO)

The first in, first out (FIFO) costing method assumes two things:

  • The items purchased or produced first were also the first items sold.
  • The inventory items at the end of your reporting period are matched with the costs of related items recently purchased or produced.

The price of items often fluctuates over time, due to market value or availability. Inflation causes prices to increase over time. Deflation causes prices to decrease over time. Depending on how those prices impact a business, the business may choose an inventory costing method that best fits its needs.

During inflation, the FIFO method assumes a business’s least expensive products sell first. As prices increase, the business’s net income may increase as well. This process may result in a lower cost of goods sold calculation compared to the LIFO method. However, during price deflation, the opposite may occur.

For example, a jeweler makes 10 gold rings in a month. When production started, it cost $100 to make gold rings. Due to inflation, the cost to make rings increased before production ended. By the end of production, gold rings cost $150 to make. Using FIFO, the jeweler would list COGS as $100, regardless of the price it cost at the end of the production cycle. Once those 10 rings are sold, the cost resets as another round of production begins.

Last in, first out (LIFO)

The last in, first out (LIFO) costing method assumes two things:

  • The items purchased or produced last are the first items sold.
  • Closing inventory items are considered to be part of the opening inventory from the same year. Items are assumed to have been sold in order of acquisition. That includes items in your inventory at the start of your year and those acquired during the year.

The LIFO method will have the opposite effect as FIFO during times of inflation. Items made last cost more than the first items made, because inflation causes prices to increase over time. The LIFO method assumes higher cost items (items made last) sell first. 

Thus, the business’s cost of goods sold calculation will be higher because the products cost more to make. LIFO also assumes a lower profit margin on sold items and a lower net income for inventory. During times of deflation, the opposite may occur.

For example, Let’s say the same jeweler makes 10 gold rings in a month and estimates the cost of goods sold using LIFO. The cost at the beginning of production was $100, but inflation caused the price to increase over the next month. 

By the end of production, the cost to make gold rings is now $150. Using LIFO, the jeweler would list COGS as $150, regardless of the price at the beginning of production. Using this method, the jeweler would report deflated net income costs and a lower ending balance in the inventory.

The IRS notes that the LIFO method has complex rules and requires the completion of Form 970. You only need to file this form with your yearly taxes the first year you use LIFO costing. Two LIFO rules highlighted in IRS Publication 538 are “dollar-value methodology” and “simplified dollar-value methodology.”

  • The dollar-value method groups together goods and products into one or more pools or classes of items.
  • The simplified dollar-value method uses a similar pooling system but uses government price indexes to determine the annual change in price.

Average cost method

To determine the average cost of an item, use the following formula:

Avg cost per unit = Total cost of goods purchased or produced in period Number of items purchased or produced in period

In other words, divide the total cost of goods purchased in a year by the total number of items purchased in the same year.

The average cost method, or weighted-average method, does not take into consideration price inflation or deflation. Instead, the average price of stocked items, regardless of purchase date, is used to value sold items. Items are then less likely to be influenced by price surges or extreme costs. The average cost method stabilizes the item’s cost over the year.

Here’s what this method looks like, using the same jeweler example: At the beginning of production, 10 gold rings cost $100 to make. Due to price inflation, they cost $150 by the end of production. Let’s assume five rings were made at $100 and five at $150. 

Once all the rings are sold, the jeweler can calculate the average cost. Divide $1,250 (the total cost to make all the rings) by 10 (the total rings sold). The jeweler would report COGS as $125.


note icon

A 2024 study by Zebra Technologies found that 80% of logistics and distribution organizations are planning to invest in new fulfillment technology to remain competitive.


Examples of the cost of goods sold

When calculating COGS, the first step is to determine the beginning cost of inventory and the ending cost of inventory for your reporting period. 

Here’s an example:

Twitty’s Books began its 2018 fiscal year with $330,000 in sellable inventory. By the end of 2018, Twitty’s Books had $440,000 in sellable inventory. Throughout 2018, the business purchased $950,000 in inventory.

Let’s assume the bookshop is using the average costing method when determining its inventory’s starting and ending costs. Here’s how you would determine cost of goods sold: 

($330,000) + ($950,000) – ($440,000) = $840,000 cost of goods sold

Twitty’s Books would then notate this amount on its 2018 income statement.

What type of account is the cost of goods sold on an income statement?

You should record the cost of goods sold as a business expense on your income statement. Under COGS, record any sold inventory. On most income statements, cost of goods sold appears beneath sales revenue and before gross profits. You can determine net income by subtracting expenses (including COGS) from revenues.

However, some companies with inventory may use a multi-step income statement. COGS appears in the same place, but net income is computed differently. For multi-step income statements, subtract the cost of goods sold from sales. The result is gross profits. You can then deduct other expenses from gross profits to determine your company’s net income.

Cost of goods sold on the balance sheet 

The COGS typically does not appear directly on the balance sheet. Instead, COGS is reported on the income statement and directly affects the inventory figures shown on the balance sheet. The balance sheet reflects the ending inventory, which the COGS calculation directly influences. 

Is the cost of goods sold an expense?

Yes, you should record the cost of goods sold as an expense. COGS is considered a cost of running the business. To create inventory, you have to spend money. That may include the cost of raw materials, time and labor, and equipment running costs. Selling the item creates a profit, but a portion of that profit is lost due to the cost of making the item.

Typically, COGS can be used to determine a business’s bottom line or gross profits. If the cost of goods sold is high, net income may be low. During tax time, a high COGS would show increased expenses for a business, resulting in lower income taxes.


note icon

Getting your COGS calculation right can directly impact your tax liability. An over-reported ending inventory or under-reported COGS can lead to paying more taxes than you owe, which can be costly.


Journal example of how to record the cost of goods sold

You should record the cost of goods sold as a debit in your accounting journal. You then credit your inventory account with the same amount.

For example, a local spa makes handmade chapstick. One batch yields about 500 chapsticks. It costs $2 to make one chapstick. To determine the cost of goods sold, multiply $2 by 500. The spa’s total cost of goods sold for a batch is $1,000. Their cost of goods sold journal entry might look like this:

The above example shows how the cost of goods sold might appear in a physical accounting journal. The entry may look different in a digital accounting journal.

No matter how COGS is recorded, keep regular records of your COGS calculations. Like most business expenses, records can help you prove your calculations are accurate in case of an audit. Plus, your accountant will appreciate detailed records come tax time.

In accounting, debit and credit accounts should always balance out. The example above shows COGS listed as a positive expense. Inventory is listed as a negative credit. Inventory decreases as the product sells, taking away from your inventory account.

An image showing an example cost of goods sold entry.

The above example shows how the cost of goods sold might appear in a physical accounting journal. The entry may look different in a digital accounting journal.

No matter how COGS is recorded, keep regular records of your COGS calculations. Like most business expenses, records can help you prove your calculations are accurate in case of an audit. Plus, your accountant will appreciate detailed records come tax time.

In accounting, debit and credit accounts should always balance out. The example above shows COGS listed as a positive expense. Inventory is listed as a negative credit. Inventory decreases as the product sells, taking away from your inventory account.

How to calculate the cost of goods sold from the income statement

To calculate the Cost of Goods Sold (COGS) from an income statement, follow these steps:

  1. Identify COGS Directly: If the income statement explicitly lists "Cost of Goods Sold," use that number directly.
  2. If COGS is not listed, calculate it by using the formula:

COGS = Beginning Inventory + Purchases − Ending Inventory

  • Beginning Inventory: Found on the previous period's balance sheet.
  • Purchases: Sum of all purchases during the period (from the income statement or additional records).
  • Ending Inventory: Found on the current period's balance sheet.

This method gives you the COGS for the period, reflecting the direct costs of goods that were sold.

Cost of goods sold and taxes

Every business that sells products, and some that sell services, must record the cost of goods sold for tax purposes. The calculation of COGS is the same for all these businesses, even if the method for determining cost (FIFO, LIFO, or average costing method) is different. Businesses may have to file records of COGS differently, depending on their business license.

Record COGS on Line 8 of Form 1125-A for:

  • C corporations
  • S corporations
  • LLCs
  • Partnerships
  • Record COGS under Part 1: Income and calculate it in Part 3 on Schedule C for
  • Sole proprietorships
  • Single-member LLCs

COGS may be recorded on other tax forms for gross profit calculations, too. For partnerships and multiple-member LLCs, record COGS under Income for Form 1065 (partnership tax return). Corporations may record COGS under Income on Form 1120. S corporations may record COGS under Income on Form 1120-S.

Is there a cost of goods sold tax deduction?

Yes, there is a tax deduction for the cost of goods sold. This deduction is available for businesses that produce or purchase goods for sale. 

The COGS is deducted from your business revenue to determine the gross profit, which is then used to calculate taxable income. This deduction is typically reported on IRS Form 1040, Schedule C for sole proprietors and single-member LLCs, where it is specifically accounted for in the section detailing income and expenses. 

For other business structures, the deduction still applies but might be reported in different forms corresponding to their tax filing requirements. The IRS guidelines on COGS allow businesses to include the cost of products or raw materials, direct labor costs involved in production, and factory overhead in their calculations.

Streamline your accounting and save time

Tracking and measuring COGS over time is a great way to gauge your actual costs when doing business. Accurately tracking direct costs gives you a clear view of what you're spending to make a product. This knowledge is key for making smart pricing decisions.

Need to calculate your COGS, manage your expenses, or just get a better handle on your books? Let a powerful, easy-to-use accounting software like QuickBooks help you with the heavy lifting.


Recommended for you

Mail icon
Get the latest to your inbox
No Thanks

Get the latest to your inbox

Relevant resources to help start, run, and grow your business.

By clicking “Submit,” you agree to permit Intuit to contact you regarding QuickBooks and have read and acknowledge our Privacy Statement.

Thanks for subscribing.

Fresh business resources are headed your way!

Looking for something else?

QuickBooks

From big jobs to small tasks, we've got your business covered.

Firm of the Future

Topical articles and news from top pros and Intuit product experts.

QuickBooks Support

Get help with QuickBooks. Find articles, video tutorials, and more.