Where cloud cost sits in the income statement depends on its format: the nature of expense method groups expenses by what they are, the function of expense (cost of sales) method by what they are for, and only the second shows cost of goods sold and a gross profit line. For a SaaS company the split is more than bookkeeping. Whether the cloud cost of a development environment sits next to production in cost of sales changes gross margin without anything changing on the provider's invoice. Which line applies is set by the company's accounting policy and judged by the auditor; this page describes the formats and the data an allocation needs.

How it works

HGB

§ 275 of the German Commercial Code (HGB) requires the profit and loss account in vertical form, by nature of expense (Gesamtkostenverfahren, subsection 2) or by function (Umsatzkostenverfahren, subsection 3), with the listed items in a fixed order. The nature format shows expenses by type: cost of materials, including purchased services, staff costs, depreciation and amortisation, and other operating expenses. It has no cost of sales line and no gross profit, but it has an item for own work capitalised. The function format starts with revenue, the cost of the services rendered to generate that revenue and gross profit, followed by selling expenses, general administrative expenses, other operating income and other operating expenses. Subsection 3 has no line of its own for research and development; § 265(5) HGB allows further breakdown and new items whose content no prescribed item covers.

Two reliefs change what the accounts show. Under § 276 HGB, small and medium-sized corporations may combine the first items into a single gross result (Rohergebnis), in the function format revenue, cost of sales, gross profit and other operating income. Micro-entities may use a short format by nature under § 275(5): cost of materials, staff costs, depreciation and other expenses. A company using either relief shows no gross margin in its accounts.

IFRS

IAS 1 requires an analysis of expenses recognised in profit or loss by nature or by function, whichever provides information that is reliable and more relevant (paragraph 99). An entity using the function method discloses at least its cost of sales separately from other expenses. IAS 1 acknowledges that assigning costs to functions can be arbitrary and call for considerable judgement (paragraph 103), and then requires additional information on the nature of expenses, including depreciation, amortisation and employee benefits expense (paragraph 104).

For annual periods beginning on or after 1 January 2027, IFRS 18 replaces IAS 1; the EU has adopted it into Regulation (EU) 2023/1803. Operating expenses are then presented by nature or by function per line item, or a mix of both (paragraphs 78 and 79), and IFRS 18 names cost of sales and research and development as examples of function line items (paragraph 81). An entity presenting expenses by function shows any cost of sales function as a separate line, describes the nature of expenses in each function line, and discloses in a single note, among other things, depreciation, amortisation and employee benefits (paragraphs 82 and 83).

From environment to function

The provider's invoice knows no functions, only accounts, projects, services and tags. A function format therefore needs an allocation that is settled before the month is closed:

Cloud cost ofFunction line in questionWhere the allocation comes from
Production serving paying customersCost of salesProduction accounts, subscriptions or projects
Development, test, CI, preview environmentsResearch and developmentSeparate accounts or an environment tag
Internal tools and internal reportingAdministrationAccount or tag of internal IT
Demo environments for prospectsSellingOwn account or tag
Shared platform: clusters, networking, observabilitySeveral, pro rataDocumented key

How individual cost types such as support, marketplace purchases or credits are classified, and in which order the rules apply, is covered in Cloud costs in COGS: a policy for SaaS gross margin.

What it means for your cost

Gross margin is revenue minus cost of sales, divided by revenue. With the same invoice, every environment that moves between cost of sales and development shifts the margin; it then measures a rule rather than the operation. Technical gross margin sets only the cloud cost of serving customers against revenue and is a management figure beside the P&L (unit economics and unit costs).

Three allocations carry a split by function: the environment, through accounts, subscriptions, projects or a tag; the product, where several products have margins of their own; and the customer, where margin per customer is asked for (cost per customer, feature and environment). Shared items need a key (shared cost and how to split it), and whatever remains after every rule stays visible as unallocated cost in the report instead of quietly landing in one function.

The P&L follows the books: invoices, accruals and any capitalised amounts. A management report often runs on effective cost, which spreads commitments over the usage they cover, and converts foreign currency at its own rate. A reconciliation sits between the two: cost basis, accruals at month-end close, exchange rate and capitalised development (capex, opex and capitalising cloud cost). How capitalised and later amortised amounts appear in the chosen format is for you to settle with your auditor.

Where it goes wrong

  • All cloud cost in cost of sales. Symptom: gross margin falls with every new development account. Cause: development, test and internal tools sit unseparated in the function that generates revenue.
  • Margin expected, accounts without gross profit. Symptom: investors ask for gross margin and the annual accounts show none. Cause: the nature format, the gross result under § 276 or the short format under § 275(5) HGB.
  • Shared platform without a key. Symptom: cluster and network cost sits entirely in one function. Cause: there is no documented key, so the function of the account the platform runs in wins.
  • Management margin does not match the P&L. Symptom: the margin from the cost report differs from the accounts. Cause: cost basis, accruals or exchange rate differ, and no reconciliation explains the gap.
  • Allocation changed without a date. Symptom: margin jumps with no change in usage or prices. Cause: an environment moved to another function and prior months were not recalculated under the same rule.
  • Format switched. Symptom: the comparison with the prior year breaks. Cause: § 265(1) HGB requires the form of presentation to be kept and allows departures only in exceptional cases, explained in the notes.

Sources

Read on 2026-10-16. Gesetze im Internet § 265 HGB, § 275 HGB and § 276 HGB; IFRS Foundation IAS 1 Presentation of Financial Statements and IFRS 18 Presentation and Disclosure in Financial Statements; EUR-Lex Regulation (EU) 2023/1803 with IAS 1 and its consolidated text with IFRS 18.