Optimized Sales Optimized Marketing Target Accounts For CROs For CFOs For CMOs Blog News Glossary Compare Tools About Schedule a Demo
Metrics & KPIs

Operating Expenses (OpEx)

ORM Technologies
Home/ Glossary/ Operating Expenses (OpEx)
Definition Operating expenses (OpEx) are the costs a company incurs to run its business that are not part of delivering the product itself. On the income statement they sit between gross profit and operating income. In a B2B SaaS company they are usually three lines, sales and marketing, research and development, and general and administrative, plus items such as restructuring.

Operating expenses (OpEx) are the costs a company incurs to run its business that are not part of delivering the product itself. On the income statement they sit between gross profit and operating income. In a B2B SaaS company they are usually three lines, sales and marketing, research and development, and general and administrative, plus items such as restructuring.

Most guides on this search are written for small businesses, and their examples are rent, utilities, office supplies and insurance. In a software company those are small lines. Operating expenses are mostly people, and they decide whether a high gross margin turns into any profit at all. This entry gives the formula, shows what is in and out, separates OpEx from COGS and capex, and breaks down a real 10-K: HubSpot's 2025 operating expenses, line by line, with three years of the ratio and three other SaaS companies for comparison.

The operating expenses formula

Operating expenses = sales and marketing + research and development + general and administrative + other operating items. Two equivalent ways to get the number:

- Bottom up: add the operating expense lines on the income statement. - Top down: operating expenses = gross profit minus operating income.

The ratio that goes with it:

Operating expense ratio = operating expenses / revenue.

In a spreadsheet with revenue in B2, gross profit in B3 and operating income in B4: `=B3-B4` gives operating expenses and `=(B3-B4)/B2` gives the ratio. With HubSpot's 2025 figures below, that is `=2622.8-7.4`, or $2,615.4 million, and 83.5% of revenue.

What is included in operating expenses

Everything it costs to sell, build the product and run the company, below gross profit and above operating income.
LineWhat it holds in a SaaS companyBiggest items
Sales and marketing (S&M)Sales and marketing teams, commissions, advertising, events, sales toolsSalaries and commissions
Research and development (R&D)Engineering, product and design teams, dev tools, contractorsSalaries and stock-based compensation
General and administrative (G&A)Executives, finance, HR, legal, audit, insurance, back-office systemsSalaries, professional fees
Other operating itemsRestructuring, amortization of acquired intangibles, impairments, sometimes D&A on its own lineVaries by year
S&M and G&A together are SG&A. R&D sits beside them. Stock-based compensation is included in each line under GAAP, so read the 10-K note that splits it out before comparing companies. What is not an operating expense:
  • Cost of revenue (COGS). Hosting, support, onboarding and services delivery sit above gross profit. ORM's guide on what to include in SaaS COGS covers the borderline cases.
  • Capital expenditures. Laptops, servers and capitalized software go to the balance sheet first and reach operating expenses only through depreciation and amortization. See opex vs capex.
  • Non-operating items. Interest expense, interest income, foreign exchange gains and losses, and income tax sit below operating income. See operating income vs net income.

A note on definitions

Sources disagree on whether cost of goods sold counts. Xero's UK guide lists COGS as one category of operating expenses (Xero UK), and NetSuite uses "operating costs" for COGS plus operating expenses together (NetSuite). In a US GAAP income statement, and in every SaaS 10-K cited on this page, "operating expenses" means the costs below gross profit only. This entry uses that definition.

Operating expenses example: HubSpot's 2025 10-K

HubSpot reported $2,615.4 million of operating expenses in 2025, 83.5% of its $3,131.3 million of revenue. Figures are from the HubSpot Form 10-K for 2025 (consolidated statements of operations), in USD millions. Percentages are ORM's arithmetic.
HubSpot, year ended December 31, 2025$ millions% of revenue% of operating expenses
Revenue3,131.3100.0%
Gross profit2,622.883.8%
Research and development905.928.9%34.6%
Sales and marketing1,379.444.1%52.7%
General and administrative326.010.4%12.5%
Restructuring4.00.1%0.2%
Total operating expenses2,615.483.5%100.0%
Income from operations7.40.2%
The lines add to $2,615.3 million; the filing's total is $2,615.4 million because of rounding. How to read it:
  • Sales and marketing is more than half of OpEx. $52.74 of every $100 of operating expense went to winning and expanding customers.
  • Operating expenses used up 99.7% of gross profit. An 83.8% gross margin left 0.2% of revenue as operating income.
  • Stock compensation is a large part of OpEx. HubSpot recorded $489.6 million of stock-based compensation in operating expenses, 18.7% of the total. It is a real cost, but not a cash one, which is why adjusted profit measures often add it back.

Three years of the operating expense ratio

HubSpot ($ millions)202320242025
Revenue2,170.22,627.53,131.3
Total operating expenses2,032.82,301.92,615.4
Operating expense ratio93.7%87.6%83.5%
Revenue growth21.1%19.2%
Operating expense growth13.2%13.6%
Income (loss) from operations(200.9)(67.6)7.4
Source: HubSpot Form 10-K for 2025; ratios and growth rates are ORM's arithmetic. The 2023 operating expenses include $96.8 million of restructuring.

Revenue grew about 20% a year while operating expenses grew about 13%, so the ratio fell 10.2 points in two years and the operating line went from a $200.9 million loss to a small profit. That is operating leverage: the business did not get cheaper, its costs grew more slowly than its revenue. For the same years walked down to net income, see gross profit vs net income.

Operating expense ratios for four SaaS companies

Sales and marketing, R&D and G&A together run from about 56% to 85% of revenue in recent SaaS 10-K filings. Line percentages are from each company's results of operations table, as compiled on ORM's SG&A expenses entry; the totals are ORM's sums and exclude restructuring and other operating items.
Company and fiscal yearS&M %R&D %G&A %S&M + R&D + G&AGAAP operating margin
Weave, 202543.0%18.6%23.3%84.9%-12.8%
HubSpot, 202544.1%28.9%10.4%83.4%0.2%
Datadog, 202527.9%45.2%8.2%81.3%-1.3%
Salesforce, FY202634.5%14.4%7.2%56.1%20.1%
For private companies, Benchmarkit's 2025 SaaS benchmarks report median spending of 37% of revenue on S&M, 34% on R&D and 24% on G&A (Benchmarkit, 2024 data). Medians of separate lines do not add up to a median company, so read each line on its own.

Three patterns: G&A shrinks with scale (23.3% at Weave, 7.2% at Salesforce); S&M stays high at every size while the company is growing; and the mix differs more than the total. Datadog and HubSpot have almost the same total ratio, but Datadog spends on engineering and HubSpot on selling. These are four companies, not a sample, and each defines its lines its own way.

Fixed and variable operating expenses

Most SaaS operating expenses are fixed in the short run, because most of them are salaries. The variable part is small and moves with bookings or revenue: commissions, payment processing, usage-based tools and some marketing programs. That is why a revenue miss hits operating income almost dollar for dollar in the quarter it happens. ORM's entry on fixed vs variable costs shows how to split each line, and the operating budget entry shows how to flex the budget for the volume you actually reached.

How operating expenses are planned and tracked

Operating expenses are budgeted by cost center and month, then reviewed against actuals every month. Each team is a cost center with an owner, and the cost centers roll up into the S&M, R&D and G&A lines. The largest input is the headcount plan, priced at fully loaded cost; the headcount planning template and the employee cost calculator build that part. For the monthly actuals, the profit and loss template uses the same line structure as the HubSpot table above. Companies that want every discretionary line justified again each year, rather than carried forward, use zero-based budgeting.

Common mistakes with operating expenses

- Mixing COGS into OpEx. Support and hosting belong above gross profit. Putting them in OpEx flatters gross margin and makes the company look less efficient below the line. - Comparing ratios without checking stock compensation. One company's adjusted figures exclude it and another's GAAP figures include it. HubSpot's $489.6 million would move its ratio by 15.6 points. - Reading the total without the mix. An 80% ratio driven by R&D and one driven by S&M call for different decisions. - Treating a falling ratio as cost cutting. HubSpot's ratio fell 10.2 points while its operating expenses grew $582.6 million. The ratio fell because revenue grew faster. - Cutting sales capacity to hit an OpEx target. Sales hires take months to become productive, so a cut this year shows up as missing bookings next year. Plan S&M from the bookings target, as in ORM's sales budget guide.

Operating expenses and ORM

The biggest operating expense line in most SaaS companies, sales and marketing, is planned from the bookings forecast: how many sellers, starting when, at what cost. ORM builds bookings and ARR forecasts and sales capacity models from CRM and finance data, so the S&M budget and the revenue plan start from the same numbers. ORM targets 95% forecast accuracy. For how operating expenses turn into the margin investors read, see operating margin.

This entry explains operating expenses for planning and analysis. It is not accounting, tax or legal advice.

Sources

Frequently Asked Questions

What are operating expenses?

Operating expenses are the costs of running a business that are not part of delivering its product. They include selling and marketing costs, research and development, and general and administrative costs such as finance, HR, legal, rent and insurance. On the income statement they are subtracted from gross profit to reach operating income. Cost of goods sold, interest and income tax are not operating expenses.

How do you calculate operating expenses?

Add the operating expense lines on the income statement. For a SaaS company: operating expenses = sales and marketing + research and development + general and administrative + other operating items such as restructuring. You can also work back from the totals: operating expenses = gross profit minus operating income. HubSpot's 2025 10-K shows $2,622.8 million of gross profit and $7.4 million of operating income, so its operating expenses were $2,615.4 million.

Are operating expenses the same as COGS?

No. Cost of goods sold, called cost of revenue in software, is the cost of delivering what the customer bought: hosting, support, onboarding and services. It sits above gross profit. Operating expenses are the costs of selling, building the product and running the company, and they sit below gross profit. Some small business guides use operating costs to mean both together, so check which definition a source uses.

Is payroll an operating expense?

Mostly, yes. Salaries, benefits, payroll taxes and stock-based compensation for sales, marketing, engineering and administrative staff are operating expenses, reported in the line for each person's team. Pay for people who deliver the service, such as support agents and implementation staff, goes in cost of revenue instead. Engineering pay for building capitalized software can be capitalized for a period.

Is depreciation an operating expense?

Usually, yes, at least in part. Depreciation of equipment and amortization of capitalized software are costs of operating the business. Some companies show them on a separate line within operating expenses. Most SaaS companies spread them by what the asset is used for, so amortization of the software customers use goes to cost of revenue and the rest to the operating expense lines. Either way they are added back when calculating EBITDA.

What is a good operating expense ratio for a SaaS company?

There is no single target, because the ratio depends on growth and gross margin. In 2025 10-K filings, sales and marketing, R&D and G&A together were 84.9% of revenue at Weave, 83.4% at HubSpot, 81.3% at Datadog and 56.1% at Salesforce. A growing SaaS company with an 80% gross margin and an operating expense ratio near 80% is around break even at the operating line.

Put these metrics to work

ORM builds custom revenue forecast models that turn concepts like operating expenses (opex) into prescriptive action for your team.

Schedule a Demo