Cost Accounting

Understanding COGS: How to Calculate and Use It for Better Financial Decisions

Dahlia Fayez

Dahlia Fayez

·

Content Marketing Specialist

Last updated Tuesday, June 24, 2025

You close your books at the end of the month, but something feels off. Sales looked strong, yet profits tell a different story. You wonder, where did the money go? Often, the answer lies buried in a number that many overlook: the cost of goods sold. This figure can quietly shrink your margins without you even noticing. If you've ever stayed up late trying to reconcile expenses with actual inventory, you're not alone. Understanding how to calculate the cost of goods sold isn’t just accounting; it’s clarity. It's the difference between guessing and knowing.

What is Cost of Goods Sold (COGS)?

Cost of Goods Sold (COGS) represents the direct costs associated with producing or acquiring the goods a business sells during a specific period. It includes the cost of raw materials, direct labor, and other production-related expenses, but excludes indirect costs such as distribution and marketing. For product-based businesses, Cost of Goods Sold (COGS) is one of the most important components on the income statement. It directly affects the gross profit, which is calculated as revenue minus Cost of Goods Sold (COGS). A higher COGS reduces profitability, while a lower COGS can improve margins.

Understanding your COGS helps to:

  • Evaluate product profitability.
  • Set the right pricing strategy.
  • Manage inventory effectively.
  • Prepare accurate tax filings and financial reports.

How is the Cost of Goods Sold Calculated?

The cost of goods sold only includes direct costs related to the production or purchase of goods. It does not include indirect expenses such as administrative salaries, office rent, marketing, or distribution costs. To ensure accurate COGS calculations, businesses must maintain precise inventory records, as any error in counting or valuing inventory will directly affect the result. Additionally, the method used to track inventory (periodic vs. perpetual) will impact how the cost of goods sold (COGS) is calculated and reported. In periodic inventory systems, COGS is determined at the end of the accounting period by physical counts. In contrast, perpetual systems update inventory and COGS in real time after each transaction, offering better accuracy but requiring more advanced tracking systems.

The most common formula to calculate COGS is:

COGS = Beginning Inventory + Purchases During the Period – Ending Inventory

Let’s break it down:

  • Beginning Inventory: The value of inventory at the start of the period.
  • Purchases: All costs related to acquiring or producing goods during the period (raw materials, direct labor, manufacturing costs).
  • Ending Inventory: The value of unsold inventory at the end of the period.

Example:

If your beginning inventory is SAR 100,000, you purchased SAR 200,000 worth of materials during the year, and your ending inventory is SAR 80,000, then:

COGS = 100,000 + 200,000 – 80,000 = SAR 220,000

Where does Cost of Goods Sold appear on the Income Statement?

The cost of goods sold is one of the first and most prominent items listed on the income statement. It appears directly below revenues or sales, and is subtracted from them to calculate gross profit.

Gross Profit = Revenue – Cost of Goods Sold

By positioning COGS immediately after sales, the income statement highlights how efficiently a company produces or sources the products it sells. A lower COGS relative to sales indicates strong profit margins, while a higher COGS may suggest rising costs or pricing inefficiencies.

It’s also important to note that service-based companies may not report COGS, but instead use terms like “cost of services” or “direct costs.” For product-based businesses, however, COGS is crucial for evaluating profitability and operational health. In audited financials and management reports, COGS is always shown as a line item in the upper portion of the income statement, often accompanied by detailed breakdowns in notes or annexes.

Cost of Sales vs Cost of Goods Sold – Are They the Same?

Although often used interchangeably, “cost of sales” and “cost of goods sold” (COGS) are not always the same, and the difference matters depending on the nature of your business.

Cost of Goods Sold (COGS) refers specifically to the direct costs of producing or purchasing physical goods that are sold to customers. It’s most common in manufacturing, retail, and wholesale businesses. This includes raw materials, direct labor, and manufacturing overhead.

Cost of Sales, on the other hand, is a broader term. Service-based businesses or companies with both products and services often use it. It may include direct costs of delivering services, such as consultant salaries, travel expenses, and tools used in project delivery.

Key differences in 2 points:

  • COGS is specific to inventory-based businesses.
  • Cost of Sales applies to a wider range of industries, including services.

Both serve a similar purpose: to subtract direct costs from revenues and calculate gross profit. When preparing financial reports, consistency in terminology is important. Businesses should follow accounting standards relevant to their jurisdiction, such as IFRS or GAAP to decide which term is more appropriate.

How to Calculate Cost of Sales

The Cost of Sales includes all direct costs associated with delivering a product or a service to the customer. This concept expands slightly beyond COGS, principally for companies that provide services, custom projects, or a blend of both.

  • For a product-based company, the cost of sales often equals the cost of goods sold:

Cost of Sales = Beginning Inventory + Purchases – Ending Inventory

  • For a service-based company, the formula adjusts to include the cost of labor and service delivery:

Cost of Sales = Direct Labor + Subcontracted Services + Project Materials + Travel + Other Direct Expenses

Example – Service Business:

A consulting firm pays SAR 80,000 in employee salaries, SAR 20,000 in subcontracting, and SAR 5,000 in travel for client work during a month. The cost of sales would be:

80,000 + 20,000 + 5,000 = SAR 105,000

Cost of sales provides a more comprehensive view of the direct expenses involved in generating revenue, especially in service-based or mixed-model businesses. The cost of sales captures all direct efforts needed to fulfill customer expectations, whether in products or services. For businesses that offer both, it’s common to separate the cost of sales for services from the cost of goods sold for products, allowing more accurate analysis of profitability per segment. Proper classification and tracking of these costs help managers and finance professionals understand which activities are generating value and where inefficiencies may be occurring.

Calculating COGS in a Perpetual Inventory System

A perpetual inventory system updates inventory and cost of goods sold continuously in real time after every purchase and sale. Unlike the periodic method, which calculates COGS at the end of a period, the perpetual system tracks the movement of goods as they occur, making it more accurate for businesses with high transaction volumes or large inventories.

In this system, every sales transaction automatically reduces inventory and records the cost associated with that sale in the COGS account. There are several costing methods used in perpetual systems, each of which affects the COGS figure differently:

  • FIFO (First-In, First-Out): Oldest inventory costs are recorded as sold first.
  • LIFO (Last-In, First-Out): Most recent inventory costs are recorded as sold first (less common under IFRS).
  • Weighted Average Cost: The Cost per unit is averaged after each purchase.

Example (FIFO):

Purchase 100 units @ SAR 10 → Inventory = SAR 1,000

Purchase 100 units @ SAR 12 → Inventory = SAR 2,200

Sell 150 units → COGS = (100 × 10) + (50 × 12) = SAR 1,600

How Wafeq Helps You Calculate COGS Accurately

Accurate cost of goods sold (COGS) calculations require more than a formula; they claim clean data, real-time tracking, and proper integration between inventory, purchasing, and sales. That’s where Wafeq becomes a powerful asset.

With Wafeq, businesses can automate the calculation of COGS through a fully integrated system that connects inventory levels, purchase orders, and sales invoices. As you record sales or receive goods, Wafeq updates inventory values and calculates COGS instantly using FIFO or weighted average costing, depending on your setup.

Key benefits of using Wafeq for COGS include:

  • Real-time COGS updates with every sale.
  • Flexible inventory valuation (FIFO or weighted average).
  • Full purchase and sales tracking across multiple warehouses.
  • Seamless accounting integration, ensuring correct debit/credit entries.
  • Detailed cost breakdowns for each product sold.
  • Bilingual reports for compliance and internal analysis.

Also Read: Inventory Calculation Made Easy: Core Formulas & Practical Examples.

Understanding how to calculate the cost of goods sold is major for accurate financial reporting, smart pricing, and sustainable profit margins. It's more than a number; it’s a reflection of how well you manage your inventory, costs, and business decisions. With tools like Wafeq, calculating COGS becomes automatic, reliable, and aligned with business growth goals.

FAQs about Cost of Goods Sold

What is the cost of goods sold entry in accounting?

The COGS entry records the transfer of inventory costs into the expense account when goods are sold. The journal entry is:

COGS Entry

Debit: Cost of Goods Sold Credit: Inventory

This reflects the reduction in assets (inventory) and the recognition of expense (COGS) on the income statement.

How is net sales calculated in the income statement?

Net sales are calculated by subtracting sales returns, allowances, and discounts from gross sales.

Net Sales = Gross Sales – Returns – Discounts – Allowances

What costs are not included in inventory cost?

Inventory cost includes all the costs necessary to bring the goods to their present location and condition. Costs not included are:

  • Administrative overhead.
  • Marketing and advertising expenses.
  • Storage costs are not directly related to production.
  • Abnormal waste or spoilage.

These are considered period costs and expensed as incurred.

Is the cost of goods sold a debit or credit?

Cost of goods sold is recorded as a debit in the income statement, representing an expense. It is matched against sales (a credit) to determine gross profit.

What’s the difference between COGS and operating expenses?

COGS reflects the direct cost of producing goods sold, while operating expenses include indirect costs, as rent, salaries, utilities, and marketing. COGS is deducted first to calculate gross profit; operating expenses are deducted afterward to reach operating profit.

Can the cost of goods sold be negative?

Under normal circumstances, COGS should not be negative. If it appears negative, it may indicate errors in inventory entries, returns being misclassified, or incorrect journal postings.

Does IFRS allow LIFO for COGS calculation?

No. IFRS does not permit the use of the LIFO method. Companies using IFRS must choose between FIFO, weighted average cost, or specific identification.

Start using Wafeq to automate COGS calculation, streamline inventory, and get real-time financial insights that help you grow with clarity.