Different-COGS-Different-Profit_-What-Your-ERP-Is-Really-Calculating

Different COGS, Different Profit: What Your ERP Is Really Calculating

By Surya Sagar | ERP Solution Architect & ERP Implementation Expert

Your sales team tells you that sales are growing.

The finance team tells you that gross profit is falling.

The warehouse team says the stock quantity is correct.

And then someone asks the ERP team:

“Why is the product cost different from what we expected?”

This is a situation I have seen many times during ERP implementations.

At first, everyone assumes there must be a problem with the accounting posting. But very often, the accounting entry is perfectly correct. The real issue is much earlier in the transaction flow—the inventory costing method being used by the ERP.

A business may purchase the same product several times at different prices. It may then sell, consume, transfer, return, or manufacture that product. The ERP needs to decide what cost method should be assigned to every product category.

That decision affects inventory valuation, COGS, gross profit, production cost and management reporting.

And this is why inventory costing should never be treated as simply another checkbox during ERP configuration.

The Problem Starts When the Same Product Has Different Costs

Let us take a very simple example.

A company purchases the same product three times:

PurchaseQuantityCost per Unit
Purchase 1100₹100
Purchase 2100₹120
Purchase 3100₹140

The company now has 300 units, but those units have not all been purchased at the same cost.

Now the company sells 150 units.

The obvious question is:

What is the cost of those 150 units?

There is no single answer unless the company has defined a costing policy.

Should the ERP take the oldest cost?

The latest cost?

An average cost?

The latest purchase order price?

The latest invoice price?

A standard cost?

Each approach can produce a different inventory value and a different COGS.

And therefore, it can produce a different gross profit.

Revenue and COGS Are Two Different Things

Before discussing the costing methods, there is one important concept that needs to be clear.

Inventory costing normally does not determine sales revenue.

Suppose a company sells 100 units at ₹200 each.

The sales value is:

Revenue = 100 × ₹200 = ₹20,000

Now suppose the ERP calculates the cost of those 100 units at ₹120 each.

COGS = 100 × ₹120 = ₹12,000

Therefore:

Gross Profit = ₹20,000 − ₹12,000 = ₹8,000

If another costing method calculates the cost at ₹140 per unit:

COGS = ₹14,000

Gross profit becomes:

₹20,000 − ₹14,000 = ₹6,000

The revenue has not changed.

The customer still paid ₹20,000.

The quantity sold is still 100 units.

What changed is the cost assigned to the sale.

That is why inventory costing has such a direct impact on profitability.

What Happens Inside the ERP When a Sale Is Posted?

In a simplified accounting flow, a sale of ₹20,000 with a product cost of ₹12,000 may result in:

Revenue Posting

Dr. Customer / Accounts Receivable – ₹20,000
Cr. Sales Revenue – ₹20,000

COGS Posting

Dr. COGS – ₹12,000
Cr. Inventory – ₹12,000

The revenue entry is driven by the sales transaction and selling price.

The COGS entry depends on the inventory cost calculated by the ERP.

Therefore, when the costing method changes the inventory cost, it can also change the COGS and gross profit reported by the business.

This is one of the first things I explain to finance and business teams during ERP discussions.

One Product, Many Costing Methods

Let us use the same purchase example throughout this article:

  • 100 units @ ₹100
  • 100 units @ ₹120
  • 100 units @ ₹140
  • Sales quantity = 150 units
  • Selling price = ₹200 per unit

Therefore:

Revenue = 150 × ₹200 = ₹30,000

Now let’s see how different costing methods can look at the same inventory.

1. Weighted Average Costing

Weighted Average calculates the average cost by considering both the quantity and value of inventory.

The total inventory value is:

  • 100 × ₹100 = ₹10,000
  • 100 × ₹120 = ₹12,000
  • 100 × ₹140 = ₹14,000

Total value:

₹36,000

Total quantity:

300 units

Weighted average cost:

₹36,000 ÷ 300 = ₹120 per unit

If 150 units are sold:

COGS = 150 × ₹120 = ₹18,000

Revenue:

₹30,000

Gross Profit:

₹30,000 − ₹18,000 = ₹12,000

Closing inventory:

150 units × ₹120 = ₹18,000

Why is this useful?

Weighted Average is useful when the business does not want individual purchase-price layers to determine the cost of every issue.

It gives management a blended view of inventory cost.

This can be particularly useful for businesses where similar materials are purchased repeatedly from different suppliers at different prices.

2. Weighted Average PO

This method uses the weighted average of purchase order prices, based on the relevant purchase order quantities.

This is different from simply looking at the actual invoice cost.

Consider the following purchase orders:

Purchase OrderQuantityPO Price
PO-001100₹120
PO-002200₹130

The weighted PO value is:

(100 × ₹120) + (200 × ₹130)

= ₹12,000 + ₹26,000

= ₹38,000

Total quantity = 300 units.

Weighted Average PO Cost:

₹38,000 ÷ 300 = ₹126.67 per unit

If 150 units are consumed:

COGS = 150 × ₹126.67 = ₹19,000.5

Revenue:

₹30,000

Gross Profit:

₹30,000 − ₹19,000.5 = ₹10,999.5

Closing inventory:

150 units × ₹126.67 = ₹19,000.5

The important point is that this method is based on the purchase order price basis, rather than simply taking the actual invoice price.

This can be useful where an organization wants its costing to reflect the purchasing commitment or agreed PO price.

3. FIFO – First In, First Out

FIFO means:

First In, First Out.

The basic costing assumption is that the inventory received first is consumed or sold first.

Our inventory is:

  • 100 units @ ₹100
  • 100 units @ ₹120
  • 100 units @ ₹140

We sell 150 units.

Under FIFO:

First 100 units:

100 × ₹100 = ₹10,000

Next 50 units:

50 × ₹120 = ₹6,000

Therefore:

COGS = ₹16,000

Revenue:

₹30,000

Gross Profit:

₹30,000 − ₹16,000 = ₹14,000

Closing inventory:

  • 50 units @ ₹120 = ₹6,000
  • 100 units @ ₹140 = ₹14,000

Total closing inventory:

₹20,000

FIFO can make sense for businesses where older inventory is expected to be consumed before newer inventory.

However, there is an important distinction between financial costing and physical warehouse issue policy.

FIFO costing should not automatically be confused with FEFO, which is based on expiry dates.

We will look at that difference in the next article on material issue policies.

4. LIFO – Last In, First Out

LIFO means:

Last In, First Out.

The costing assumption is that the most recently acquired inventory is consumed or sold first.

Using the same inventory:

  • 100 units @ ₹100
  • 100 units @ ₹120
  • 100 units @ ₹140

Sales quantity = 150 units.

Under LIFO:

100 units come from the ₹140 layer:

100 × ₹140 = ₹14,000

50 units come from the ₹120 layer:

50 × ₹120 = ₹6,000

Therefore:

COGS = ₹20,000

Revenue:

₹30,000

Gross Profit:

₹30,000 − ₹20,000 = ₹10,000

Closing inventory:

  • 100 units @ ₹100
  • 50 units @ ₹120

Total closing inventory:

₹16,000

Compare the results:

MethodRevenueCOGSGross Profit
FIFO₹30,000₹16,000₹14,000
LIFO₹30,000₹20,000₹10,000
Weighted Average₹30,000₹18,000₹12,000

Same product.

Same purchases.

Same quantity sold.

Same selling price.

But the reported gross profit is different.

That is the practical impact of inventory costing.

LIFO also has accounting and regulatory considerations, so an organization should confirm whether it is appropriate under the accounting framework and jurisdiction in which it operates before configuring it in an ERP.

5. Average PO

Average PO is another approach where the ERP considers purchase order prices from the starting of the ERP irrespective of the stock available in the warehouse to determine an average purchase-related cost.

For example:

POQuantityPO Price
PO-001100₹100
PO-002100₹120
PO-003100₹140

The average PO price is:

(₹100 * 100 + ₹120 * 100 + ₹140 * 100) ÷ 300 = ₹120

Therefore, if 150 units are sold:

COGS = 150 × ₹120 = ₹18,000

Revenue:

₹30,000

Gross Profit:

₹12,000

The important thing to understand is that Average PO and Weighted Average PO are not necessarily the same.

Weighted Average considers the on-hand quantities while the Average PO considers the accumulated quantities starting from the ERP system irrespective of the on-hand stock.

6. Average Invoice

Instead of using purchase order prices, some businesses may want costing to reflect invoice prices. The Average Invoice costing method uses the cumulative quantities and cumulative value to determine the cost of the inventory.

Suppose the supplier invoices the company at:

  • Invoice 1 = 100 Qty and ₹105
  • Invoice 2 = 100 Qty and ₹125
  • Invoice 3 = 100 Qty and ₹145

A simple average invoice price would be:

(₹105 *100 + ₹125 *100 + ₹145 *100) ÷ 300 = ₹125

If 150 units are sold:

COGS = 150 × ₹125 = ₹18,750

Revenue:

₹30,000

Gross Profit:

₹11,250

This approach can be useful when the organization considers the supplier’s invoiced price more relevant than the original PO price.

This distinction can become important when there are differences between:

PO Price → Receipt Price → Invoice Price

For example, a supplier may confirm an order at ₹100, but finally invoice at ₹105 because of a price revision, freight, or another commercial adjustment.

The ERP costing design must clearly define which price should influence inventory valuation.

7. Last Invoice

Last Invoice costing uses the price from the most recent purchase invoice as the basis for the relevant cost.

Suppose the latest invoice is:

Last Invoice Price = ₹145 per unit

If 150 units are sold:

COGS = 150 × ₹145 = ₹21,750

Revenue:

₹30,000

Gross Profit:

₹8,250

This method can be useful where management wants the inventory cost to closely reflect the most recently invoiced purchase price.

However, it can also create significant fluctuations.

Imagine the previous invoice was ₹120 and the latest invoice suddenly becomes ₹145.

The cost used by the ERP can increase sharply.

Therefore, businesses using such a method should understand how this will affect:

  • COGS
  • Gross margin
  • Inventory valuation
  • Product profitability

8. Last PO

Last PO costing takes the price from the most recent purchase order.

Suppose the latest PO has a price of:

₹140 per unit

The ERP may therefore use ₹140 as the relevant cost.

For 150 units:

COGS = 150 × ₹140 = ₹21,000

Revenue:

₹30,000

Gross Profit:

₹9,000

Notice how this can differ from Last Invoice.

If:

Last PO = ₹140

but:

Last Invoice = ₹145

then the two costing methods can produce different COGS.

This is why the implementation team should ask a simple but important question:

“Which price does the business consider the correct cost?”

The answer may not always be the same as the latest supplier invoice.

9. Standard Costing

Standard Costing takes a different approach.

Instead of allowing the product cost to move directly with every purchase price, the organization establishes a predefined standard cost.

Suppose the standard cost of a product is:

₹125 per unit

The company sells 150 units.

COGS based on standard cost:

150 × ₹125 = ₹18,750

Revenue:

₹30,000

Gross Profit:

₹11,250

Now suppose the actual purchase price is ₹140.

There is a difference of:

₹140 − ₹125 = ₹15 per unit

This difference can be analyzed as a variance according to the organization’s accounting and ERP design.

Standard Costing is particularly useful in manufacturing environments because management often wants to understand:

What should the product cost?

versus

What did the product actually cost?

For example:

Cost ComponentStandardActual
Raw Material₹80₹85
Labour₹20₹22
Machine Cost₹15₹18
Overhead₹10₹11
Total₹125₹136

Now management can ask a much more useful question:

“Why did the actual cost increase from ₹125 to ₹136?”

Perhaps the answer is raw material price, machine utilization, labour efficiency or overhead.

That is much more valuable than simply knowing that the product became more expensive.

Putting All the Costing Methods Together

Using the same simplified selling scenario, the result may look like this:

Costing MethodExample Cost BasisIllustrative COGSRevenueIllustrative Gross Profit
Weighted Average₹120₹18,000₹30,000₹12,000
Weighted Average PO₹120₹19,000.5₹30,000₹10,999.5
FIFOLayered cost₹16,000₹30,000₹14,000
LIFOLayered cost₹20,000₹30,000₹10,000
Average PO₹120₹18,000₹30,000₹12,000
Average Invoice₹125₹18,750₹30,000₹11,250
Last Invoice₹145₹21,750₹30,000₹8,250
Last PO₹140₹21,000₹30,000₹9,000
Standard Cost₹125₹18,750₹30,000₹11,250

Important: These are simplified illustrations to explain the principle. Actual ERP costing results depend on the organization’s configuration, transaction sequence, inventory rules, returns, adjustments, landed costs, negative stock handling, production costing and accounting policies.

The key lesson is not that one method always produces the highest or lowest profit.

The key lesson is:

The costing method determines how the ERP assigns cost to inventory transactions, and that can materially affect COGS, inventory valuation and gross profit.

A Real ERP Implementation Situation

One statement I have heard repeatedly during ERP implementations is:

“The stock quantity is correct, but the stock value is not matching our expectation.”

The warehouse team may say:

“We have 10,000 units.”

Finance may say:

“Our inventory should be worth ₹12 lakh.”

The ERP may show:

“Inventory value = ₹13.2 lakh.”

Who is correct?

Before changing anything, I would look at the transaction history.

Perhaps the business has:

  • Purchased the same product from different suppliers.
  • Received material at one price and invoiced it at another.
  • Entered purchase returns.
  • Made stock adjustments.
  • Used different warehouses.
  • Had price changes during the month.
  • Consumed material in production.
  • Received finished goods from production.
  • Sold products before the latest invoice was posted.

The quantity can be absolutely correct while the value is different because quantity and cost are two separate dimensions of inventory.

This is why costing needs to be discussed during ERP blueprinting, not after go-live.

When Purchase Prices Keep Increasing

Consider a manufacturer whose raw material price changes like this:

MonthPurchase Cost
January₹100
February₹110
March₹125
April₹140

The company continues selling the finished product at ₹200.

Initially:

Cost = ₹110

Gross margin:

₹200 − ₹110 = ₹90

Later:

Cost = ₹140

Gross margin:

₹200 − ₹140 = ₹60

The sales price has not changed.

Revenue has not changed.

But profitability has fallen.

This is where an ERP becomes useful.

Instead of simply telling management:

“Profit is lower.”

the ERP should help answer:

“Why is profit lower?”

Is it because:

  • Purchase prices increased?
  • Production costs increased?
  • Labour costs increased?
  • Machine costs increased?
  • Overheads increased?
  • The costing method changed?
  • A different cost layer was used?

That is the difference between an ERP being merely a transaction-processing system and an ERP becoming a management tool.

Manufacturing Makes Costing Even More Important

In manufacturing, product cost is rarely just the purchase price of one component.

A finished product may contain:

  • Raw materials
  • Semi-finished goods
  • Direct labour
  • Machine time
  • Setup time
  • Electricity
  • Production activities
  • Manufacturing overheads

For example:

Cost ComponentAmount
Raw Material₹500
Direct Labour₹100
Machine Cost₹75
Electricity₹25
Production Overhead₹50
Product Cost₹750

Now suppose the raw material increases from ₹500 to ₹600.

The product cost may also increase.

This can eventually affect:

Production Cost → Inventory Valuation → COGS → Gross Profit

This is why manufacturing ERP implementations require more than simply configuring a BOM and routing.

The organization must also define how the resulting costs will be calculated and posted.

One Mistake I Recommend Avoiding During ERP UAT

Do not test inventory costing with only:

Purchase → Sale

That is too simple.

During UAT, I recommend testing realistic transaction sequences.

Scenario 1 – Multiple Purchases

Purchase:

  • 100 @ ₹100
  • 100 @ ₹120
  • 100 @ ₹140

Then sell 150 units.

Verify:

  • COGS
  • Inventory value
  • Gross profit

Scenario 2 – Purchase Return

Return part of the inventory to the supplier.

Check whether the cost and accounting are adjusted correctly.

Scenario 3 – Sales Return

Customer returns goods.

Check how the returned inventory is valued.

Scenario 4 – Price Difference

PO price = ₹100

Invoice price = ₹110

Check how the selected costing method handles the difference.

Scenario 5 – Stock Adjustment

Make an inventory adjustment.

Verify the impact on quantity, valuation and accounting.

Scenario 6 – Manufacturing

Issue raw materials.

Complete production.

Receive finished goods.

Sell the finished product.

Then check the complete chain:

Material Cost → Production Cost → Finished Goods Cost → COGS → Gross Profit

These tests provide much greater confidence than checking whether a sales invoice simply posted successfully.

The Most Important Question Is Not “Which Method Is Best?”

During an ERP implementation, someone will eventually ask:

“Which costing method should we use?”

I don’t believe that question should be answered by the ERP consultant alone.

The discussion should involve:

  • Finance
  • Cost Accounting
  • Procurement
  • Warehouse
  • Supply Chain
  • Production
  • Management
  • ERP implementation team

Because the right method depends on the business.

A pharmaceutical business may have very different requirements from a metal manufacturer.

A trading company may operate differently from a process manufacturer.

An importer may need to consider landed costs.

A manufacturer may need standard costing and production variance analysis.

The ERP should therefore be configured around the organization’s business and accounting policy, not simply around whichever costing method happens to be available in the software.

Costing Method Is Only One Side of the Story

There is another question that often gets confused with inventory costing:

Which physical stock should the warehouse issue?

For example, suppose the warehouse has:

  • Old stock
  • New stock
  • Stock with different expiry dates

The financial costing method and the warehouse issue policy do not necessarily have to be the same thing.

A warehouse may need to issue material based on:

FIFO – First In, First Out

or:

FEFO – First Expiry, First Out

or another business-defined material policy.

This is particularly important for industries such as pharmaceuticals, food, chemicals and other products where expiry and shelf life matter.

Inventory costing answers “What cost should be assigned?”

Material issue policy answers “Which stock should be physically issued?”

These are related, but they are not the same question.

In the next article, we will explore FIFO, LIFO and FEFO as material policies, and why choosing the right issue policy can be just as important as choosing the right costing method.

How Cyprus ERP and Onfinity ERP Fit Into This Picture

At Cyprus ERP and Onfinity ERP, costing should not be looked at as an isolated finance configuration.

An ERP transaction is connected.

A typical flow may look like:

Purchase Order

Material Receipt

Inventory

Material Consumption / Production

Finished Goods

Sales

COGS

Financial Accounting

The costing method sits inside this larger transaction flow.

For a manufacturing organization, the product cost may involve raw materials, production activities, labour, machine time, electricity and other production costs.

For a trading organization, purchase price, invoice price, landed cost and inventory valuation may be more important.

The objective is therefore not simply to show a number called Product Cost.

The objective is to provide a cost that management can understand and use.

If a product’s cost increases, management should be able to investigate whether the increase came from:

  • Raw material prices
  • Supplier price changes
  • Purchase price differences
  • Labour
  • Machine time
  • Electricity
  • Production activities
  • Overheads
  • Other cost components

This is where an integrated ERP becomes much more valuable than maintaining separate spreadsheets for purchasing, inventory, production and finance.

Is Your ERP Calculating the Right Cost?

If your organization is facing questions such as:

  • Why is inventory valuation different from our expectation?
  • Why has COGS suddenly increased?
  • Why has gross margin changed even though selling prices have not changed?
  • Why is the product cost different between two periods?
  • Why does the production cost not match the finance team’s calculation?
  • Should we use Weighted Average, FIFO, Standard Cost or another method?
  • Should our costing be based on PO price or invoice price?
  • Which material issue policy should our warehouse follow?

These are not merely accounting questions.

They are ERP design questions.

The costing method, transaction sequence, inventory policy, production process and accounting configuration all need to work together.

That is why costing should be addressed during ERP blueprinting, configuration, testing and UAT—not discovered after go-live when the financial reports no longer match management expectations.

A good ERP implementation should make it possible to answer not only:

“What did we sell?”

but also:

“What did it actually cost us?”

and ultimately:

“How profitable was that sale?”

That is the real value of connecting inventory, costing, sales, manufacturing and finance in an ERP system.

Frequently Asked Questions

Does inventory costing change sales revenue?

Generally, no. Revenue is primarily determined by the sales transaction and selling price. The costing method affects the cost assigned to inventory sold, which affects COGS and gross profit.

Which costing method is best?

There is no single best method for every business. The appropriate method depends on the business model, inventory characteristics, accounting requirements and management objectives.

What is the difference between Weighted Average and Weighted Average PO?

Weighted Average generally considers the on-hand quantity and price from the Invoice while Weighted Average PO uses the on-hand quantity and price from the PO. The exact behavior depends on the ERP’s costing design and configuration.

What is the difference between Average PO and Weighted Average PO?

Weighted Average generally calculates the inventory cost based on the cumulative quantity and cumulative value of inventory from the beginning of the ERP system’s costing history.

Weighted Average PO determines the inventory cost using the current on-hand quantity and inventory value, based on the applicable purchase order costs.

The exact behavior of each costing method may vary depending on the ERP’s costing logic, transaction flow, and configuration.

Why can Last Invoice and Last PO produce different costs?

Because the latest purchase order price and the final supplier invoice price may not be the same. Price revisions, freight, commercial adjustments and other differences can cause the invoice price to differ from the PO price.

Does Standard Cost affect COGS?

It can, depending on the ERP’s accounting and costing design. Standard costing establishes a predetermined cost and can also be used to analyze differences between standard and actual costs.

Does costing affect manufacturing?

Yes. Raw material costs and production costs can affect the cost of finished goods, inventory valuation and eventually COGS when those finished goods are sold.

Is FIFO the same as FEFO?

No. FIFO is based on the sequence in which inventory is received, while FEFO is based primarily on expiry date. They address different business requirements.

About the Author

Surya Sagar is an ERP Solution Architect, ERP implementation expert and founder of BRS Infotek .

With more than 19 years of ERP experience and 100+ ERP implementations, his practical experience covers Sales, Procurement, Inventory, MRP, Manufacturing, WMS, Finance, Costing and ERP transformation.

His approach to ERP implementation is based on understanding the real business process first and then designing the ERP around that process.

Over the years, he has worked with businesses where seemingly simple questions—such as why inventory value is different or why product margins have changed—have required a detailed investigation of purchasing, inventory, production, costing and accounting transactions.

This practical implementation experience forms the basis of his approach to ERP consulting and solution design.

He is also associated with Cyprus ERP and Onfinity ERP, applying this experience to the design and implementation of integrated ERP solutions for businesses.

About Cyprus ERP and Onfinity ERP

Cyprus ERP and Onfinity ERP provide integrated ERP capabilities across areas including:

Sales | Procurement | Inventory | MRP | Manufacturing | Finance | CRM | Fixed Assets | Business Intelligence

The objective is not simply to automate individual departments.

It is to connect the complete business transaction flow so that purchasing, inventory, manufacturing, sales, costing and accounting work together.

For organizations struggling with inventory valuation, product costing, production costing or profitability visibility, the right ERP design can make a significant difference.

Want to understand whether your current ERP costing process is giving you the right financial picture?

Explore Cyprus ERP and Onfinity ERP, or connect with an ERP expert to discuss your business requirements and costing process.

Written by Surya Sagar
ERP Solution Architect | Founder – BRS Infotek

Author: Surya Sagar

Leave a Reply

Your email address will not be published. Required fields are marked *