Home / 🌡️ Business planning calculators/ Cost of Goods Sold Calculator

Cost of Goods Sold (COGS) Calculator

Print Report
$
$
$
$
Cost of Goods Sold (COGS)
$0
Total Inventory Available for Sale $0
Inventory Absorption Rate 0.0%

If you run a retail store, an e-commerce brand, or a manufacturing facility, the absolute biggest expense on your income statement is the physical cost of the products you sell. You cannot calculate your company’s gross profit or file your corporate taxes until you know exactly how much money you spent acquiring or building those items. This critical accounting metric is known as the Cost of Goods Sold (COGS).

Our free online Cost of Goods Sold Calculator allows business owners, inventory managers, and accountants to instantly measure their direct product costs. By tracking your beginning inventory, new purchases, and ending inventory, you can accurately deduce exactly how much physical product left your warehouse, ensuring your profit margins and tax filings are mathematically flawless.


How to Use the COGS Calculator

In standard accounting, you do not calculate COGS by counting every individual item sold. Instead, you use a broader inventory formula. Here is how to input your data:

  • Step 1: Beginning Inventory. Enter the exact dollar value of all the physical inventory sitting in your warehouse at the very beginning of the year (or quarter).
  • Step 2: Additional Purchases. Enter the total amount of money you spent buying new inventory, raw materials, or paying direct freight-in costs during this specific timeframe.
  • Step 3: Ending Inventory. Perform a physical inventory count at the end of the year. Enter the exact dollar value of all the products still sitting on your shelves.

The Accounting Trap: What Counts as COGS?

The single most common mistake small business owners make during tax season is putting standard operating expenses into their COGS bucket. COGS only includes expenses directly tied to the physical production of the item.

Expense Type Included in COGS? Real-World Examples
Direct Materials YES Raw leather for shoes, microchips for computers, or wholesale items bought from a supplier for resale.
Direct Factory Labor YES The hourly wages of the assembly line worker actively building the product.
Marketing & Sales NO Facebook ads, sales team commissions, and marketing flyers are Operating Expenses (OPEX), never COGS.
Administrative Overhead NO The CEO’s salary, accounting software, and front-office rent.

Real-World Example: The Shopify Clothing Brand

To truly understand how this accounting formula works, let’s look at an independent Shopify clothing brand preparing their year-end taxes.

On January 1st, they had exactly $20,000 worth of t-shirts sitting in their warehouse (Beginning Inventory).

Throughout the year, their business exploded. They ordered massive shipments from their supplier, spending exactly $100,000 on new shirts and freight-in shipping (Purchases).

On December 31st, the owner walks into the warehouse and physically counts the remaining shirts. They have exactly $15,000 worth of unsold shirts sitting on the shelves (Ending Inventory).

The math is: $20,000 (Beginning) + $100,000 (Purchases) = $120,000 of Available Inventory.

Then, we subtract the Ending Inventory: $120,000 – $15,000 = $105,000.

Their Cost of Goods Sold for the year is exactly $105,000. If the business generated $300,000 in total sales revenue, they subtract this COGS to reveal a Gross Profit of $195,000.


Once you calculate your COGS, you can use it to determine the exact profitability of your individual product lines using our Gross Margin Calculator. If you are struggling with a high COGS and want to know how to strategically reduce it, use our Contribution Margin Calculator.


Frequently Asked Questions (FAQ)

Does a software company (SaaS) have COGS?

Historically, software companies had zero COGS because copying digital code is free. However, modern accounting standards have adapted. SaaS companies now list “Cost of Revenue” on their income statements, which acts as their COGS. This includes AWS/Google Cloud server hosting costs, third-party API fees, and customer support payroll directly tied to delivering the software.

What is the difference between FIFO and LIFO?

These are inventory valuation methods. FIFO (First-In, First-Out) assumes the oldest products you bought were sold first (standard for perishable goods like groceries). LIFO (Last-In, First-Out) assumes the newest, most recently purchased products were sold first. Because prices generally rise with inflation, using LIFO usually results in a higher COGS, which lowers your taxable profit (making it popular for corporate tax strategy).

Is shipping included in COGS?

It depends on the direction of the shipping. “Freight-In” (paying a cargo ship to bring raw materials from overseas to your factory) is absolutely included in COGS. However, “Freight-Out” (paying FedEx to ship the final purchased product to the customer’s front door) is considered a marketing/sales expense and is usually excluded from COGS.

How does COGS affect my business taxes?

COGS is a massive tax deduction. The IRS considers COGS to be the cost of doing business, so it is fully subtracted from your Gross Revenue before your taxes are calculated. If your COGS goes up, your taxable net income goes down, meaning you owe the government less money in corporate income tax.

Can a service-based business use COGS?

Yes, but it is usually called “Cost of Services” (COS) instead. For a consulting firm or a law firm, they don’t have physical inventory. Instead, their “COGS” consists of the direct billable hours paid to junior lawyers or contractors who directly executed the service for the client.

What happens if I miscount my Ending Inventory?

If you accidentally count $5,000 too much in your Ending Inventory, your COGS will artificially decrease by $5,000. This will artificially inflate your Gross Profit by $5,000, which means you will accidentally pay too much in corporate taxes for that year. Accurate inventory counts are critical to preventing tax overpayment.