Cost accounting: definition, allocation keys and how to set it up in an SME

Published · Updated · 15 min read

Dylan Arnaud, founder of Datafuji

Cost accounting, also called management accounting, reclassifies the costs and revenues of the general ledger by business line (product, customer, branch or job) to show where the company makes money. With the same invoices, a business line can earn €43k or lose €78k depending on the allocation key chosen. A worked SME example shows which number to trust before you decide.

What is cost accounting?

Cost accounting classifies general ledger entries by purpose, according to what each cost was used for. Financial accounting tells you how much the company earned; cost accounting tells you on which product, which customer or which job.

Financial accounting classifies costs by nature (purchases, rent, salaries), as the tax authorities and the bank require. Both start from the same entries:

QuestionFinancial accountingCost accounting
How costs are classifiedBy nature: purchases, rent, salariesBy purpose: business line, customer, site, job
ReadersTax authorities, banks, shareholdersManagement and business line managers
RulesStatutory: in France, the Commercial Code and the chart of accounts (PCG)Chosen by the company, to be written down
MandatoryYesNo, except in a few cases
Useful frequencyThe fiscal year, with interim statementsMonthly
ResultOne, for the companyOne per business line, adding up to the company’s

Six terms are enough to follow the rest:

  • Analytical axis: the dimension you split by (product, customer, branch, job). Accounting software also calls it a “plan” or “dimension.”
  • Cost object (or analytical section): one value on the axis, such as “Lyon branch” or “Job 2026-014.”
  • Direct cost: it relates to a single cost object and is assigned to it without any calculation.
  • Indirect cost: it serves several cost objects, like rent, supervision or accounting.
  • Allocation key (allocation base): the rule that splits an indirect cost between cost objects (floor space, hours, revenue).
  • Full cost: direct costs plus a share of indirect costs; for a product sold, it is its cost price.

In French, “comptabilité de gestion” (management accounting) is the more recent name for the same thing; FP&A and management control go further, adding budgets and variances. The French chart of accounts defines neither.

The two levels of analysis come down to two subtractions:

Direct margin
  = business line revenue
  − its direct costs
Business line result
  = direct margin
  − its share of indirect costs

The first depends only on the invoices; the second, on the key chosen. Strictly speaking, the direct margin is not the contribution margin, which deducts variable costs rather than direct costs, although some sources use the two terms interchangeably.

How do you allocate costs between business lines?

Direct costs are assigned to a business line without calculation; indirect costs are allocated with a key, a measure of what each business line consumes. The whole convention lies in this second step.

The French chart of accounts defines them in the context of the production cost of a fixed asset (article 213-15). Direct costs are those “that can be assigned, without any intermediate calculation, to the cost of a given good or service.” For example, the sheet metal in a stamped part or the hours a technician logs on a job.

The SME in our example is fictitious, the same one as in the cost price calculator. In October, it invoices €2,840k across three business lines: machined parts, stamped parts and subassemblies (assembled parts). Direct costs: €1,910k; indirect costs: €788k.

The diagram shows the path of every euro of cost.

The SME’s €2,698k of October costs follow two paths. On the left, €1,910k of direct costs (materials, subcontracting, direct labor) go to each business line with no calculation, backed by a source document: €830k to machined parts, €645k to stamped parts, €435k to subassemblies. On the right, €788k of indirect costs, €504k of production overhead and €284k of non-production overhead, go through an allocation key, a convention to be chosen: each business line’s share remains a question mark until the key is chosen.The SME’s €2,698k of October costs follow two paths. On the left, €1,910k of direct costs (materials, subcontracting, direct labor) go to each business line with no calculation, backed by a source document: €830k to machined parts, €645k to stamped parts, €435k to subassemblies. On the right, €788k of indirect costs, €504k of production overhead and €284k of non-production overhead, go through an allocation key, a convention to be chosen: each business line’s share remains a question mark until the key is chosen.
Direct costs are assigned without calculation; the €788k of indirect costs go through a key.

Only the right-hand branch requires a choice: it is the one that will move the results.

The allocation key formula

A key applies the business line’s share of the chosen measure to the cost:

Allocated share = indirect cost
  × business line’s measure
  ÷ total measure

Subassemblies, hours key:
  €788k × 4,000 h ÷ 12,000 h
  = €263k

Direct does not mean variable. A team leader dedicated to stamped parts is a fixed, direct cost; the workshop’s electricity, a variable, indirect one. The first distinction splits the result; the second is used to calculate a break-even point.

Cost centers and cost drivers

A cost center is a part of the company whose costs are tracked, with a manager: a workshop, a department, a branch. With revenue attached, it becomes a profit center. French textbooks speak of “centres d’analyse” or “sections homogènes”; accounting software, of analytical sections.

To go from the center to the products, you choose a unit of work (the French “unité d’œuvre,” close to an allocation base or cost driver), the measure of what the center provides. The SME’s workshop carries €504k of indirect production costs for 12,000 direct labor hours, or €42 per hour. A part that takes a minute and a half therefore receives €1.05 of workshop overhead.

With several centers, allocation happens in two steps, in the overhead allocation table: this is the cost center method French textbooks call “méthode des sections homogènes.” Primary allocation spreads costs across all centers, both support centers (maintenance, administration) and operating centers (workshop, distribution). Secondary allocation transfers the support centers’ costs to the operating centers, which then charge them to products through their unit of work. English-language textbooks call this second step service department allocation, by the direct, step-down or reciprocal method.

Which key for which cost?

A key holds up when it follows what causes the cost. Here are the most common:

Indirect costKey that follows the causeWhat you need to measure
Rent, building maintenance, heatingFloor space occupiedA floor plan, updated when the layout changes
Workshop supervision, consumablesDirect labor hoursTime logged by business line or by production order
Maintenance, machine depreciationMachine hours, or direct assignment if the machine serves only one business lineMachine times from the ERP or production tracking
Human resources, payrollHeadcountHeadcount by business line, from payroll
Purchasing, stores, receivingNumber of orders or lines receivedPurchase orders by business line
Sales, sales administrationRevenue, or number of customer ordersInvoicing
General management, accounting, ITNo key follows the causeNothing: leave them unallocated, or allocate them on revenue and say so

Three criteria decide between two keys: the better one follows the cause, can be measured without effort every month, and makes sense to whoever receives the cost. A perfect key that nobody updates is worth less than a simple key kept up to date.

Example: the SME’s profit by business line, depending on the key

For the manufacturing SME in the example, the subassemblies result ranges from +€43k (floor space key) to −€78k (hours key), with the same invoices. Their direct margin and the company’s profit, €142k, do not move.

October figures, business line by business line:

Business lineRevenueDirect costsDirect margin
Machined parts€1,240k€830k€410k (33.1%)
Stamped parts€980k€645k€335k (34.2%)
Subassemblies€620k€435k€185k (29.8%)
Company€2,840k€1,910k€930k (32.7%)

To allocate its €788k of indirect costs, the SME also has three physical measures:

Business lineHeadcountFloor spaceDirect labor hours
Machined parts391,700 m²5,200 h
Stamped parts282,400 m²2,800 h
Subassemblies29900 m²4,000 h
Company965,000 m²12,000 h

The company’s profit is 930 − 788 = €142k, or 5.0% of revenue. The question is who earns it.

Before and after: the same SME with two keys

First view, the most common because it requires no measurement: the €788k allocated on revenue.

With the revenue key, one bar per business line: the direct margin, minus the allocated indirect costs. Machined parts: margin €410k, allocated costs €344k, result +€66k. Stamped parts: 335, 272, +€63k. Subassemblies: 185, 172, +€13k; they account for 21.8% of revenue but 33% of the hours. All three results are positive; company: 930 − 788 = €142k.With the revenue key, one bar per business line: the direct margin, minus the allocated indirect costs. Machined parts: margin €410k, allocated costs €344k, result +€66k. Stamped parts: 335, 272, +€63k. Subassemblies: 185, 172, +€13k; they account for 21.8% of revenue but 33% of the hours. All three results are positive; company: 930 − 788 = €142k.
With costs allocated on revenue, all three business lines make money, subassemblies €13k.

Nothing looks alarming. But subassemblies use a third of the workshop hours for less than a quarter of revenue: the key spares them part of the supervision cost.

Second view: the same €788k allocated on direct labor hours.

Same bars, same scale, with the direct labor hours key. The direct margins are identical: 410, 335 and €185k. The allocated costs become 341, 184 and €263k. Results: +€69k for machined parts, +€151k for stamped parts, and −€78k in orange for subassemblies, whose allocated costs exceed their margin: a €91k swing from the revenue key, without a single invoice changing. Company: €142k, unchanged. The share of allocated costs above the margin, €78k, is shaded orange.Same bars, same scale, with the direct labor hours key. The direct margins are identical: 410, 335 and €185k. The allocated costs become 341, 184 and €263k. Results: +€69k for machined parts, +€151k for stamped parts, and −€78k in orange for subassemblies, whose allocated costs exceed their margin: a €91k swing from the revenue key, without a single invoice changing. Company: €142k, unchanged. The share of allocated costs above the margin, €78k, is shaded orange.
With costs allocated on hours, subassemblies lose €78k; the total stays at €142k.

The blue margin bars have not moved; only the gray block of allocated costs has shifted, and a €91k swing has appeared without a single invoice changing.

The five possible keys, side by side, in €k:

ViewMachined partsStamped partsSubassembliesCompany
Direct margin (no key)410335185930
Result, revenue key666313142
Result, headcount key90105−53142
Result, floor space key142−4343142
Result, hours key69151−78142
Result, one key per cost pool68119−45142

The last row is closest to practice: the €504k of production overhead follows hours, the €284k of non-production overhead follows revenue. Floor space reverses the ranking: the presses and sheet metal stock of the stamped parts line take up nearly half the building (2,400 m² out of 5,000).

What the example shows

  • A key neither creates nor destroys a single euro. It moves costs around: €142k in all five cases.
  • The direct margin is the most solid number. Challenging a key does not change it. Its rate is measured against revenue, so it is a margin, not a markup on cost (margin and markup calculator).
  • Profit by business line is a convention. It must be written down, stable from one month to the next, and always shown next to the direct margin.
  • When a resource is scarce, look at the margin per unit of that resource. A workshop hour yields €120 of direct margin on stamped parts, €79 on machined parts, €46 on subassemblies: if workshop hours run short, this number tells you where to put them.

The trap is basing the decision on the “−€78k” line. If no indirect cost went away, shutting down the “loss-making” business line would take the company from a €142k profit to a €43k loss: 142 − 185 = −€43k.

Shutting it down removes €185k of margin and leaves the shared costs to the other two. It would only be neutral if €185k of indirect costs disappeared, or 23% of the €788k. The right question becomes: which costs would actually go away?

What are the cost accounting methods?

The main methods are direct costs, variable costing, specific costs, full costing, normal-capacity absorption and activity-based costing (ABC). They answer different questions, and an SME often combines two.

The list follows the curriculum of the French accounting degree (DCG, “Management control” unit, 200 hours). The SME example shows two: direct costs and full costing.

MethodQuestion it answersSetup costIts trap
Direct costs (direct margin)What does each business line earn before any convention?Low: code sales, purchases and timeIt ignores the overhead consumed: a business line that ties up the workshop looks better than it is.
Variable costing (also called direct costing, in English as in French textbooks)What does one more sale bring in? Where is break-even?Low to medium: classify every cost as fixed or variableThe boundary shifts with the time horizon; a price set on variable cost never pays for overhead.
Specific costs (close to segment margin)Does the business line cover its own fixed costs?Medium: isolate the fixed costs specific to each business lineA “specific” cost does not always go away with the business line: a lease runs to its end.
Full costing, or absorption costing (cost centers)What does what I sell cost, all in?High: sections, units of work, keys, monthly measurementsWhen volume falls, unit cost rises without any purchase price changing.
Normal-capacity absorption of fixed costs (French “imputation rationnelle”)What is my cost at normal activity, and what does idle capacity cost?High: full costing plus a normal level per sectionSet too low, the “normal” level hides idle capacity; too high, it invents some.
Activity-based costing (ABC)Which products and customers really consume overhead?Very high: map the tasks, one cost driver per taskA model so detailed that nobody keeps it up to date after two years.

Normal-capacity absorption is not just an exam topic. To value inventory, the French chart of accounts allocates fixed production overhead on the basis of normal capacity (the expected average activity). The amount allocated per unit “is not increased as a result of lower production” (article 213-32).

Activity-based costing (ABC)

Activity-based costing allocates indirect costs according to what triggers them, not according to volume. It starts from an observation by Robin Cooper and Robert Kaplan (1988): a single base, such as hours, makes long production runs carry costs that short runs cause.

It works in two steps. First, from costs to activities, in the sense of tasks (placing an order, setting up a run, shipping, invoicing). Then, from activities to products or customers, with a cost driver (number of orders, setups, deliveries).

A customer who orders small quantities fifty times a year then receives fifty times the cost of an order, a delivery and an invoice. With a revenue key, that customer would carry as much as one who orders once.

It is worth the effort when indirect costs weigh heavily (27.7% of revenue in the SME) and products or customers differ widely. In 2004, Kaplan and Steven Anderson noted that many companies had abandoned it as too costly, and proposed a lighter version based on time estimates: time-driven ABC.

Before an ABC project, test a single question, such as the cost of a customer order, over one quarter in Excel.

How do you set up cost accounting in an SME?

In six steps: choose an axis, define the sections, code entries at the source, write down the keys, check the reconciliation every month, then read the result at two levels. The accounting software you already have is usually enough.

  1. Choose the axis. Start from the decision to be made. “Which products should we push?”: product axis. “Which customers cost us money?”: customer axis. “Is this job making money?”: job axis. One axis in the first year: a second doubles the coding work.
  2. Define the sections. Five to fifteen, not fifty, each with an owner. Add an “overhead” section for shared costs and an “unassigned” section, which should stay almost empty.
  3. Code at the source. The analytical code, the section identifier carried by each journal entry line, is entered when the invoice is posted; for salaries, it comes from payroll. Three settings help: a default section per account or supplier, a distribution template for shared costs, and mandatory entry on expense and revenue accounts (classes 6 and 7 of the French chart of accounts).
  4. Write down the keys. One per pool of indirect costs, on a single page: the cost, the key, the source of the measure, the review date. Without it, in two years nobody will know why a business line carries 40% of the rent.
  5. Check the reconciliation. Every month, account by account, the allocated total must equal the general ledger total. The difference goes into “unassigned”; until it is explained, nothing else gets read.
  6. Read at two levels. The direct margin, then the result after allocation.

Costs carried over unchanged are called incorporated costs. If you add notional costs that are not in the books (the work of an unsalaried owner-manager), or remove non-incorporated costs (a one-off expense), keep a reconciliation table:

Accounting profit
  = cost accounting profit
  + notional costs
  − non-incorporated costs

The reconciliation is read by setting the two totals side by side.

Two bars of the same length, on the same scale. At the top, October costs by nature in the general ledger (purchases, subcontracting, salaries, rent and other): €2,698k. At the bottom, the same costs broken down by business line with one key per cost pool, direct costs in light blue and allocated indirect costs in gray: machined parts €1,172k (830 + 342), stamped parts €861k (645 + 216), subassemblies €665k (435 + 230), and an empty “unassigned” box, at 0, to be explained if it fills up. The two totals, framed in green, are equal: €2,698k.Two bars of the same length, on the same scale. At the top, October costs by nature in the general ledger (purchases, subcontracting, salaries, rent and other): €2,698k. At the bottom, the same costs broken down by business line with one key per cost pool, direct costs in light blue and allocated indirect costs in gray: machined parts €1,172k (830 + 342), stamped parts €861k (645 + 216), subassemblies €665k (435 + 230), and an empty “unassigned” box, at 0, to be explained if it fills up. The two totals, framed in green, are equal: €2,698k.
Broken down by business line, the total still comes to €2,698k: this check is what makes profit by business line credible.

An “unassigned” box that fills up signals coding that is getting sloppy.

What common accounting software does

You probably have nothing to buy: common accounting packages include cost accounting, with one or more codes per journal entry line. The table covers software widely used in France, as documented for its French editions.

SoftwareIts vocabularyWhat the vendor documents
Sage 100 ComptabilitéAnalytical plans, sectionsFile menu, Company settings, Analytics; distribution across several sections; in “column” entry mode, three plans at most and one section per entry.
Sage 50 (formerly Ciel)Analytical codesThe “mandatory analytical/budget distribution” option rejects an entry with no code on the accounts concerned.
EBP Comptabilité ElitePlans (axes), items, templatesUnlimited plans, 12 item levels, distribution across several items and plans, templates, reallocation, analytical budgets.
PennylaneFamilies, analytical categories“Pilotage & analyses” menu; the categories in a family add up to 100%; structured plan from the Premium subscription.
OdooAnalytic plans and accountsPercentage distribution, automatic distribution models (account, partner, product), plan can be made mandatory.

Check your edition before building a three-axis plan. One limitation is common to all: the FEC (the standard journal entries file required by the French tax authorities) contains no analytical code. To get cost accounting data out of the software, you need an analytical export, the API (the direct access the software offers to other programs) or the database (Power BI for accounting).

Do SMEs already have the tools?

We found no public statistics on the share of SMEs that keep cost accounts, whether from INSEE (the French national statistics office), the Banque de France or Bpifrance. INSEE measures the tool that carries it (the ERP) and the one used to read it (business intelligence, or BI). These are French benchmarks:

French companies with 10 or more employees, 2025Uses an ERPUses BI software
10 to 19 employees44.7%4.8%
20 to 49 employees58.5%9.0%
50 to 249 employees80.5%29.1%
250 employees or more92.6%70.1%
All53.9%10.7%
Manufacturing65.1%13.4%
Wholesale trade and motor vehicle repair74.5%15.2%
Construction43.0%5.3%
Accommodation and food services30.1%7.9%

Between 50 and 249 employees, eight companies out of ten have an ERP, fewer than three out of ten BI software. Having an ERP does not prove that sections are entered in it.

What about class 9 accounts?

French courses still mention “class 9” (accounts reserved for cost accounting in the former French chart of accounts), but the current chart has 8 classes (articles 1111-1 and 1131-1) and no chapter on cost accounting. It mentions it only in passing, for transfers between establishments “recorded in cost accounting” (commentary on account 18). An SME adds sections to its expense and revenue accounts (classes 6 and 7), and reconciles by construction.

Is cost accounting mandatory?

Not for most companies. In France, the Commercial Code requires financial accounting and annual accounts (article L123-12), not cost accounting. Three situations do, however, call for a cost calculation or cost accounting tools.

SituationWhat the text saysReference
Inventories of manufactured goods or work in progressTheir production cost includes “the systematic allocation of production overhead, fixed and variable”: a full cost calculation, at least once a yearFrench chart of accounts (PCG), article 213-32
Long-term contracts whose profit is recognized as work progresses (percentage of completion)Estimating the expected final result (at completion) presupposes “the existence of management, cost accounting and internal control tools”; construction is the first sector concerned (job tracking)French chart of accounts (PCG), article 622-5
Public bodiesCost accounting “based on financial accounting,” which measures “the costs of a structure, a function, a project, a good produced or a service provided”; in a company, revenue is added, and therefore marginsFrench Decree No. 2012-1246, article 59

For inventories, the text does not require cost accounts kept all year round. It accepts standard costs, set in advance (article 213-35). For agricultural activities, it even contemplates an entity that “does not keep cost accounts” (article 618-13). With no production inventory, there is no obligation; the real question is: which decision are you making blind?

Which mistakes should you avoid, and when can you do without it?

The costliest mistakes: basing decisions on the result after allocation alone, not checking the reconciliation, creating too many sections. And sometimes, a full-blown cost accounting system brings nothing that a sales export does not already give you.

  • Basing decisions on the allocated result alone. Shutting down a “loss-making” business line with a positive margin shifts its indirect costs onto the others (the example goes from a €142k profit to a €43k loss).
  • No reconciliation. The cost accounting total no longer matches the general ledger, and nobody believes the numbers anymore (reconciling management and financial accounting margins).
  • Too many sections. Forty sections for thirty employees: nobody reads forty lines.
  • Keys never reviewed. The floor space figures predate the extension: review once a year, and at every reorganization.
  • Mixing two axes. “Lyon branch,” “Product A” and “Key accounts” in the same plan: one invoice falls under three sections. One axis, one question.

When to do without it

Cost accounting takes data entry time every day. In five cases, something simpler is enough:

Your situationWhat is enough
A single business line, on a single siteA monthly P&L broken into its intermediate subtotals (in France, the intermediate management balances)
The question is about margin by product or customerInvoicing and purchase prices, with no key (margin calculator)
Low indirect costsThe direct margin: the key would change almost nothing
No time trackingThree months of time tracking first
A question asked once a yearAn Excel study on the fiscal year’s accounts

A dashboard does not replace this work: Power BI reads sections, it does not invent them. Without data entry or reconciliation, it will display wrong margins, nicely formatted.

How do you go from cost accounting to a dashboard?

You go from cost accounting to a dashboard by publishing every month, by section, the direct margin and then the result after allocation, against budget, in a report connected to the accounting system.

  • In the executive dashboard: direct margin by business line, against budget and last year, a KPI of the management dashboard.
  • In the management income statement: a P&L by business line, with both levels and the “unassigned” line visible.
  • In the work of the FP&A analyst (contrôleur de gestion in France): cost accounting provides actuals by section; FP&A and management control add budget and variances.

A Power BI report rebuilds this income statement by axis at every refresh, down to the journal entry, with the reconciliation shown; keys are dated and two can be compared side by side. Connections are covered in Power BI for accounting and Power BI and ERP.

The SME’s leadership team then no longer asks which business line to shut down, but where to put the workshop hours: where they yield €120, not €46.

Frequently asked questions

What are the 4 accounting principles?

It depends on the framework, and French rules do not list four. The French chart of accounts (PCG, articles 121-1 to 121-5) sets out a true and fair view, comparability and going concern, regularity and fair presentation, prudence and consistency of methods. Cost accounting has no principles of its own, only conventions, which you write down and keep stable.

Can you do cost accounting in Excel?

Yes, for a one-off study: a trial balance export, a “business line” column and allocation keys are enough once a year. Not for monthly tracking: redone by hand, the allocation eventually stops reconciling; the code should then be entered when each invoice is posted.

What are the four types of accounting?

French textbooks usually distinguish four: financial, cost (or management), budgetary and, depending on the author, cash or public-sector accounting; no standard fixes the list. Financial accounting is mandatory and classifies costs by nature; cost accounting classifies them by purpose. Budgetary accounting compares forecasts with actuals.

What are the 4 types of costs?

Most French textbooks use the four stages of full costing: purchase cost, production cost, distribution cost, then total cost, which adds them up. No standard fixes the list; English-language textbooks more often cross fixed and variable with direct and indirect.

The details and formulas of the four types of costs are in the cost price calculator.

Let’s talk about your reporting.

A 30-minute video call with Dylan Arnaud. You come away with a clear scope and a fixed price.

Dylan Arnaud, Power BI consultant and founder of Datafuji
Dylan ArnaudFounder · your single point of contact