Skip to content

Cost of Goods Sold: Definition, COGS Calculation and Management

Cost of Goods Sold (COGS) represents the total direct costs incurred by a company to produce or purchase goods that were sold during a specific accounting period.

Last edited: 16 September 2026

  • Accounting Management

Cost of Goods Sold (COGS) stands as one of the most critical financial metrics determining the success of any commercial or manufacturing business. It serves as the compass guiding financial decisions and revealing the true financial health of a company. In this comprehensive guide, we'll explore everything you need to know about COGS and how to leverage it to improve your business profitability.

What are the costs included in Cost of Goods Sold (COGS)?

Direct Costs Included:

  • Raw materials and essential components
  • Direct labor wages for production workers
  • Direct manufacturing costs such as electricity and fuel
  • Freight and transportation costs for raw materials

Costs Excluded:

  • Administrative and general expenses
  • Marketing and advertising costs
  • Sales and distribution expenses
  • Administrative salaries
  • Office rent for administrative functions

This clear distinction between direct and indirect costs helps companies understand the true cost of producing their products accurately.

The Basic COGS Formula

Primary Formula:

Cost of Goods Sold = Beginning Inventory + Net Purchases - Ending Inventory

Breaking Down the Formula Components:

1. Beginning Inventory:

  • Value of goods on hand at the start of the accounting period
  • Represents leftover inventory from the previous period
  • Valued at cost price, not selling price

2. Net Purchases:

  • Total purchases made during the period
  • Add: Freight-in, customs duties, insurance costs
  • Subtract: Purchase returns, purchase allowances, purchase discounts

3. Ending Inventory:

  • Value of goods remaining at the end of the accounting period
  • Determined through physical inventory count
  • Excluded from cost calculation as these items weren't sold

Comprehensive Practical Example

Let's assume "Mezan Trading Company" has the following data for 2024:

Item Value (SAR)
Beginning Inventory 150,000
Total Purchases 500,000
Freight-in Expenses 25,000
Purchase Returns 15,000
Purchase Discounts 10,000
Ending Inventory 180,000

Solution:

Step One: Calculate Net Purchases

Net Purchases = Total Purchases + Freight-in + Insurance - Returns - Discounts

Net Purchases = 500,000 + 25,000 + 0 - 15,000 - 10,000 = 500,000 SAR

Breakdown:

  • Total Purchases: 500,000 SAR
  • Plus: Freight-in expenses: 25,000 SAR
  • Minus: Purchase returns: (15,000) SAR
  • Minus: Purchase discounts: (10,000) SAR
  • Total = 500,000 SAR

Step Two: Apply the Basic Formula

Cost of Goods Sold = 150,000 + 500,000 - 180,000 = 470,000 SAR

This means Mezan Trading Company spent 470,000 SAR as direct costs to produce the goods sold during 2024.

Methods for Calculating Cost of Goods Sold

1. Periodic Inventory System

In this system, COGS is calculated once at the end of the accounting period:

Advantages:

  • Easy to implement for small businesses
  • Lower operational costs
  • Suitable for companies with limited inventory

Disadvantages:

  • No continuous inventory monitoring
  • Difficult to detect theft or damage quickly
  • May affect accuracy of interim reports

2. Perpetual Inventory System

COGS is updated with each sale or purchase transaction:

Advantages:

  • Accurate and continuous inventory monitoring
  • Quick detection of problems and damage
  • More accurate financial reports
  • Better inventory level control

Disadvantages:

  • Requires advanced accounting systems
  • Higher operational costs
  • Needs employee training

Inventory Valuation Methods and Their Impact on COGS

1. First-In, First-Out (FIFO) Method

Assumes that goods purchased first are sold first:

Example:

  • Purchase 100 units at 10 SAR each in January
  • Purchase 100 units at 12 SAR each in February
  • Sell 120 units

Calculation:

Cost of Goods Sold = (100 × 10) + (20 × 12) = 1,240 SAR

2. Last-In, First-Out (LIFO) Method

Assumes that goods purchased last are sold first:

Using the same example above:

Cost of Goods Sold = (100 × 12) + (20 × 10) = 1,400 SAR

3. Weighted Average Method

Calculates the average cost of all units:

Detailed Example:

  • Purchase 100 units at 10 SAR = 1,000 SAR
  • Purchase 100 units at 12 SAR = 1,200 SAR
  • Total units = 200 units
  • Total cost = 2,200 SAR
Average Cost = Total Cost ÷ Total Units
Average Cost = 2,200 ÷ 200 = 11 SAR per unit

When selling 120 units:
Cost of Goods Sold = 120 × 11 = 1,320 SAR
Remaining Inventory = 80 × 11 = 880 SAR

Importance of Calculating Cost of Goods Sold

For Financial Planning:

Helps in preparing future budgets and determining financing needs. It also enables management to evaluate operational efficiency and develop performance improvement plans.

For Pricing Decisions:

By knowing the true cost of the product, companies can set selling prices that ensure adequate profit margins and cover all costs.

For Performance Measurement:

Serves as a key indicator for measuring resource utilization efficiency and comparing performance across different periods or with competitors.

For Inventory Control:

Helps determine optimal inventory levels and avoid overstocking or stockouts, improving cash flow.

Impact of COGS on Financial Statements

On the Income Statement:

Simplified Income Statement Example for Mezan Trading Company:

Gross Sales                           1,200,000 SAR
Less: Sales Returns and Allowances      (50,000) SAR
────────────────────────────────────────────────────
Net Sales                             1,150,000 SAR
Less: Cost of Goods Sold                (690,000) SAR
────────────────────────────────────────────────────
Gross Profit                            460,000 SAR
Gross Profit Margin = 460,000 ÷ 1,150,000 × 100 = 40%

This example shows how COGS directly affects gross profit and profitability margins.

On the Balance Sheet:

Affects inventory value in current assets, thus impacting total assets and liquidity ratios.

On the Cash Flow Statement:

Practical Example of COGS Impact:

Cash Flows from Operating Activities:
Net Income                                    200,000 SAR
Plus: Changes in Working Capital:
  - Increase in Inventory                     (50,000) SAR
  - Increase in Accounts Payable               30,000 SAR
────────────────────────────────────────────────────
Net Cash Flow from Operations                 180,000 SAR

Affects cash flows from operating activities and helps in planning working capital needs. Inventory increases reduce cash flow, while increases in accounts payable improve it.

Strategies for Improving Cost of Goods Sold

1. Supply Chain Management Optimization:

  • Negotiate better prices with suppliers
  • Diversify supply sources to avoid dependence on one supplier
  • Improve purchasing and receiving processes
  • Use modern inventory management techniques

2. Operational Efficiency Improvement:

  • Reduce production waste
  • Improve labor productivity
  • Regular equipment maintenance to avoid downtime
  • Apply Lean Manufacturing principles

3. Technology Utilization:

  • Smart inventory management systems
  • Planning and forecasting software
  • Automate some processes to reduce errors
  • Data analytics to discover opportunities

4. Inventory Management Enhancement:

  • Apply Just-in-Time (JIT) systems
  • ABC inventory analysis
  • Improve inventory turnover
  • Reduce obsolete and slow-moving inventory

Common Errors in COGS Calculation

1. Inaccurate Inventory Valuation:

Problem: Valuing inventory at incorrect prices or inaccurate inventory counts.

Solution: Apply strict inventory procedures and use consistent valuation methods.

2. Including Indirect Costs:

Problem: Adding administrative or marketing expenses to COGS.

Solution: Clear distinction between direct and indirect costs.

3. Ignoring Returns and Discounts:

Problem: Not deducting purchase returns or discounts received.

Solution: Accurately record all returns and discounts.

4. Inventory Manipulation:

Problem: Adjusting inventory numbers to artificially improve financial results.

Solution: Apply strict internal control procedures.

Practical Applications of COGS in Different Sectors

In E-commerce:

Includes cost of products purchased, shipping fees, packaging costs, and direct platform fees.

In Manufacturing:

Includes raw material costs, direct labor wages, and direct manufacturing costs such as electricity and fuel.

In Restaurants:

Includes food material costs, chef wages, and utility costs used in preparation.

In Retail:

Includes cost of purchasing goods, transportation and shipping costs, and import duties if applicable.

1. Gross Profit Margin:

Formula:

Gross Profit Margin = (Sales - Cost of Goods Sold) ÷ Sales × 100

Practical Example:

  • Total Sales: 800,000 SAR
  • Cost of Goods Sold: 480,000 SAR
Gross Profit Margin = (800,000 - 480,000) ÷ 800,000 × 100 = 40%

This means the company achieves a 40% gross profit margin, which is a good indicator in most industries.

2. Inventory Turnover Ratio:

Formula:

Inventory Turnover Ratio = Cost of Goods Sold ÷ Average Inventory

Practical Example:

  • Cost of Goods Sold: 600,000 SAR
  • Beginning Inventory: 100,000 SAR
  • Ending Inventory: 140,000 SAR
  • Average Inventory = (100,000 + 140,000) ÷ 2 = 120,000 SAR
Inventory Turnover Ratio = 600,000 ÷ 120,000 = 5 times annually

This means the company sells and replenishes its inventory 5 times per year.

3. Average Inventory Period:

Formula:

Average Inventory Period = 365 ÷ Inventory Turnover Ratio

Practical Example (continuing from above):

Average Inventory Period = 365 ÷ 5 = 73 days

This means goods remain in inventory for an average of 73 days before being sold.

4. COGS to Sales Ratio:

Formula:

COGS Ratio = Cost of Goods Sold ÷ Net Sales × 100

Practical Example:

  • Cost of Goods Sold: 350,000 SAR
  • Net Sales: 500,000 SAR
COGS Ratio = 350,000 ÷ 500,000 × 100 = 70%

This means 70% of the company's revenue goes to cover COGS, while the remaining 30% represents gross profit.

Contemporary Challenges in COGS Calculation

Inflation Impact:

Rising prices of raw materials and energy affect the accuracy of calculated costs and require continuous price updates.

Exchange Rate Fluctuations:

For companies importing raw materials, exchange rate fluctuations directly impact COGS.

Advanced Technology:

Using artificial intelligence and IoT in inventory management requires reconsidering cost calculation methods.

Sustainability Requirements:

Growing interest in environmental sustainability adds new costs that must be considered in COGS calculation.

Best Practices for COGS Management

1. Implement Integrated Accounting System:

Use accounting software that links inventory, purchases, and sales to ensure data accuracy and quick report preparation.

2. Regular Review:

Conduct monthly or quarterly reviews of COGS to ensure calculation accuracy and detect any deviations.

3. Continuous Training:

Train employees responsible for inventory and accounting on best practices and latest technologies.

4. Establish Control Procedures:

Apply strong internal control systems that ensure accurate recording of all inventory and purchase transactions.

Industry Benchmarks and Comparisons in Saudi Arabia

Manufacturing Industry:

  • Typical COGS ratio: 60-75% of sales
  • High material costs but better margins on finished products
  • Petrochemicals and industrial manufacturing lead the sector

Retail Industry:

  • Typical COGS ratio: 55-70% of sales
  • Lower labor costs but higher inventory carrying costs
  • Traditional and modern retail formats co-exist

Restaurant Industry:

  • Typical COGS ratio: 30-40% of sales
  • Food costs vary significantly based on imported vs. local ingredients
  • Growing hospitality and tourism sector

Technology and Services Sector:

  • Typical COGS ratio: 25-45% of sales
  • Growing sector as part of Vision 2030 diversification
  • Lower material costs but higher knowledge worker expenses

Advanced COGS Analysis Techniques

1. Variance Analysis:

Compare actual COGS to budgeted amounts to identify efficiency opportunities:

COGS Variance = Actual COGS - Budgeted COGS
Variance % = (COGS Variance ÷ Budgeted COGS) × 100

2. Trend Analysis:

Track COGS trends over multiple periods to identify patterns:

COGS Growth Rate = ((Current Period COGS - Previous Period COGS) ÷ Previous Period COGS) × 100

3. Component Analysis:

Break down COGS into material, labor, and overhead components for detailed insights.

Tax Implications of COGS

Impact on Taxable Income:

Higher COGS reduces taxable income, while lower COGS increases tax liability.

Inventory Valuation Methods:

Different methods (FIFO, LIFO, Weighted Average) can significantly impact tax obligations.

Documentation Requirements:

Proper record-keeping is essential for tax compliance and audit purposes.

Digital Transformation in COGS Management

ERP Integration:

Modern ERP systems provide real-time COGS tracking and automated calculations.

AI and Machine Learning:

Predictive analytics help forecast COGS trends and optimize inventory levels.

Blockchain Technology:

Provides transparent supply chain tracking for more accurate cost allocation.

Cloud-Based Solutions:

Enable real-time collaboration and data access across multiple locations.

Conclusion and Key Takeaways

Cost of Goods Sold is not merely an accounting figure—it's the key to understanding your company's true financial performance. Through accurate calculation and continuous monitoring of this metric, companies can:

  • Improve Profitability by identifying high-cost sources and addressing them
  • Make Informed Pricing Decisions that ensure cost coverage and adequate profit margins
  • Enhance Inventory Management and reduce unnecessary costs
  • Compare Performance with competitors and industry standards

Success in managing COGS requires deep understanding of business operations, appropriate tools, and continuous monitoring of market and technology developments. By applying the principles and strategies outlined in this guide, you can transform cost management from an accounting burden into a strategic tool that supports your business growth and success.

The future of COGS management lies in leveraging technology, maintaining operational efficiency, and staying adaptable to market changes. Companies that master these elements will maintain competitive advantages and achieve sustainable profitability.


For more specialized articles on accounting and financial management, follow Mezan - your trusted partner in financial success.

Book a free business consultation

Tell us about your business. We’ll see if Mezan can help you.

Book your consultation