Skip to main content
AG·SORA
ERP & Operations

COGS and Product Cost Accounting in an ERP: Knowing Your True Margin

Published 8 min readWritten by agsora.tech
AG·SORA / BLOGAG·SORAERP & OperationsCOGS and Product CostAccounting in an ERP:Knowing Your True Marginagsora.tech
In this article

Many business owners know their revenue is rising but are unsure whether profit is rising with it. A frequent cause is a cost of goods that is not calculated correctly. Selling prices are set from estimates, raw material costs shift unnoticed, and labour and electricity are never charged to products. In the end, a product that looks popular turns out to be eroding the margin.

Cost of goods sold (COGS) and cost accounting answer a basic question: what does it actually cost to make or procure one unit of a good or service. An accurate answer affects pricing, decisions on which products to keep, negotiation with suppliers, and overall financial health.

This article explains the components of COGS, common inventory valuation methods, how to assign indirect costs, how an ERP helps calculate and monitor costs, and common mistakes. Accounting standards and tax rules can differ and change, so confirm how they apply to your business with an accountant or tax consultant.

Summary

  • COGS covers direct materials, direct labour, and an allocation of indirect costs
  • The inventory valuation method affects reported profit, so choose one and apply it consistently
  • Reasonable overhead allocation keeps products from looking more profitable than they are
  • An ERP links purchasing, production, and inventory so costs are calculated automatically and traceable
  • Compare standard and actual cost regularly to find waste

What is included in COGS

For a trading business, COGS is relatively simple: the purchase price of goods plus the costs attached to getting them to the warehouse, such as inbound freight, duties, and insurance, less purchase discounts. The price printed on the supplier invoice is often not the true cost.

For a manufacturing business, COGS is more layered. Direct materials are materials that become part of the product, such as fabric in clothing. Direct labour is the wages of workers who work on the product. Factory overhead covers indirect costs such as electricity, machine depreciation, rent, maintenance, and supervisors' salaries.

For a service business, the main components are staff time and supporting costs that can be charged to a project or client. Without recording hours per project, a service company can hardly know which projects are profitable.

A pile of forms, receipts, and a calculator on a desk
Purchase receipts, freight, and production costs must be recorded so COGS reflects reality.

Direct, indirect, fixed, and variable costs

Direct costs can be traced to a specific product, while indirect costs are shared by many products. Another distinction is variable costs, which rise with volume such as raw materials, and fixed costs, which stay relatively constant within a range such as factory rent. The two answer different questions.

For long term pricing, all costs must be covered, including the overhead share. For short term decisions, such as accepting an extra order at a special price, variable cost is often more relevant because fixed costs are incurred whatever the decision. Understanding this difference prevents two mistakes: turning down an order that is marginally profitable and setting regular prices that do not cover full cost.

Inventory valuation methods

Goods prices change over time, so rules are needed to decide the value of goods sold and goods remaining. The moving average method recalculates the average cost at each new purchase; it is simple and widely used. First in, first out (FIFO) assumes the earliest purchased goods are sold first, so closing inventory is valued at the latest prices.

The choice of method affects reported profit and, when prices rise or fall, can differ quite a lot. Accounting standards and tax rules determine which methods are permitted, so confirm with your accountant. Most important, choose one method, apply it consistently, and document the reasons.

For businesses with individually identifiable items, such as vehicles or high value jewellery, unit level tracing can be used. Most retail and distribution businesses use average or FIFO because they are more practical.

Assigning overhead costs

Indirect costs such as electricity and machine depreciation must be shared out to products for COGS to be complete. The way is to choose an allocation base that is sensible and related to what causes the cost, for instance machine hours, direct labour hours, or production volume. The allocation rate is calculated by dividing total estimated overhead by the total allocation base.

A wrong base causes distortion. If all overhead is divided equally per unit although one product uses the machine far longer, the complex product will look cheaper and the simple one more expensive than reality. Prices and portfolio decisions then go wrong.

For complex operations, an activity based approach splits overhead into activities such as machine setup, quality inspection, and material handling, then assigns them according to actual use. It is more accurate but demands more detailed data, so start simple and upgrade when the benefit is clear.

A best selling product is not necessarily a profitable one

Without complete COGS, sales volume is misleading. A product that consumes many machine hours, has many returns, or needs much rework can look popular while pressing down profit. Calculate margin per product after all relevant costs.

Standard cost and actual cost

Standard cost is a per unit cost target set in advance based on the product recipe, normal working time, and estimated material prices. Actual cost is what really happened. The difference between the two, the variance, is a valuable clue.

  • Material price variance: are we paying more than planned, and why
  • Material usage variance: is there leftover, spoilage, or portions beyond the recipe
  • Labour variance: does the work take longer than standard
  • Overhead variance: do indirect costs exceed budget or is capacity unused

Variances are not meant for finding scapegoats but for triggering questions. A consistent material usage gap can signal an outdated recipe, a machine that overdispenses, or theft. A short monthly variance review is usually enough to expose problems before they grow.

A hand signing a document on a table
Product recipes and cost standards need to be approved and updated regularly.

How an ERP helps

Spreadsheets can calculate costs at small scale but become fragile as products multiply and material prices change often. An ERP connects the needed data in one system so costs are computed from real transactions, not from manual copies.

  • Purchasing: purchase prices and extra costs such as freight and duties recorded per goods receipt
  • Inventory: stock value calculated automatically by the chosen method and updated with every transaction
  • Bill of materials (BOM) and production routing: define each product's materials and standard times
  • Production orders: record actual material use and labour hours against each order
  • Finance: COGS is journalled automatically at sale, so the profit and loss statement stays consistent with stock
  • Margin reports: gross profit per product, customer, and period without manual calculation

Another advantage is traceability. When a product's margin falls, you can trace whether the cause is a rise in material prices, increased usage, or swollen overhead. Without such tracing, you only see the symptom.

Common mistakes

  • Ignoring inbound costs such as freight and duties so COGS is too low
  • Not updating the bill of materials when a recipe or supplier changes
  • Mixing inventory valuation methods from period to period so profit cannot be compared
  • Splitting overhead evenly without regard to differing resource use
  • Not recording actual material use and labour hours per production order
  • Setting selling prices just by adding a fixed percentage without looking at full cost
  • Counting physical stock too rarely so discrepancies are only discovered at year end

How COGS relates to pricing

COGS is a realistic floor in setting prices, not the only consideration. Price also depends on perceived value, competitor prices, and brand strategy. But without accurate COGS, you do not know how far you can discount before making a loss.

Use COGS to set discount limits, judge whether a promotion is viable, and price large orders. Also monitor the effect of rising material prices on margin and decide early whether to raise prices, change suppliers, or alter the recipe.

Steps to start

  1. 01List all cost components for one flagship product, from materials to overhead
  2. 02Choose one inventory valuation method together with your accountant and document it
  3. 03Decide an overhead allocation base related to what causes the cost
  4. 04Draw up a bill of materials and standard times for main products
  5. 05Record actual material use and labour hours for every production order
  6. 06Review variances each month and trace the largest gaps
  7. 07Update cost standards and selling prices when material prices change significantly

A hypothetical picture

As an illustration, a bakery sells three kinds of products. With the old calculation, all products were assumed to have a similar margin. After recording ingredients, labour hours, and oven use per product, it became clear that the best selling filled bun took a long time to make and left a lot of dough waste, so its margin was far thinner than the simple plain loaf.

With that information, the owner adjusted the filled bun's price, simplified the filling options, and fixed the portioning to reduce waste. There are no dramatic numbers here, just an example of how measured cost changes everyday decisions. This is an illustration of a pattern, not data from a particular client.

Closing

Accurate COGS is not the accountant's business alone. It is the basis of pricing, product, and purchasing decisions. Start by understanding the cost components, choosing a consistent valuation method, allocating overhead reasonably, and reviewing variances routinely.

When transaction volume and product count make manual calculation fragile, an ERP that unites purchasing, production, inventory, and finance saves time while giving a more honest picture of margin. That way, revenue growth truly means profit growth.

Want to know the real margin of each of your products?

The AG·SORA team can help set up COGS calculation, bills of materials, and margin reports in an ERP that fits your business processes. The first consultation is free and carries no obligation.

Free consultation

Free checklist: choosing a software house

24 points to evaluate a vendor before you sign. Can be saved as a PDF.

Get the checklist

Ready to build a system that grows with your business?

Discuss your needs with the AG·SORA team, no cost, no commitment.