Tokens Are the New Lines of Code

Tokens Are the New Lines of Code

Tokens Are the New Lines of Code

Tokens Are the New Lines of Code

Category:

AI Economics

AI ROI

AI Measurement

Published date:

Tokens are the new lines of code banner, a solid stack of code lines on the left dispersing into floating token chips on the right

Tokens are the new lines of code because they have inherited their role: the unit in which software work is produced, estimated, measured and paid for. What they did not inherit is its economics. A line of code is written once and runs almost free. A token is bought fresh every time it is used.

Key Takeaways

  • The line of code did four jobs. Tokens have taken over all four.

  • Tokens inherited the role. They did not inherit the economics. Code is capital, tokens are consumption.

  • The token bill has not landed on gross margin. Median software margin held at 80% through 2026, stable for four years.

  • It landed on headcount instead. R&D fell eight points of revenue while revenue per employee rose 17%.

  • That trade is invisible, because only one side of it is measured. Guickly is the AI measurement layer for the enterprise. It puts a number on the other side.

What did the line of code actually do?

Four jobs. They are worth separating.

It was the unit of production. Code was what engineers made. Output was described in it.

It was the unit of estimation. Projects were sized, staffed and scheduled against how much code they were expected to need.

It was the unit of productivity measurement. For the better part of two decades, teams were assessed on how many lines they shipped.

It was the unit the cost structure rested on. Software was expensive to write and nearly free to run. That asymmetry produced everything downstream: 80% gross margins, per-seat pricing and the assumption that the next customer costs almost nothing to serve.

Any claim that something has replaced the line of code has to account for all four.

Have tokens taken over that role?

Yes, on all four counts.

Production. DoorDash reported in its Q1 2026 earnings that roughly two-thirds of its code is now AI-generated. The lines of code are themselves made of tokens now.

Estimation. A team sizing an AI feature estimates tokens per request and requests per user. That is the new sizing exercise. It happens before anyone writes a line.

Productivity measurement. Token consumption is already read as a proxy for AI maturity. More calls, bigger context windows, more agents, all treated as progress. We have written about that habit as tokenmaxxing.

Cost structure. This is where the succession is most visible, because vendors have already repriced around it. Per-seat models are giving way to credits, usage tiers and consumption pricing. The token is the thing being counted.

So the claim holds. Tokens now do every job the line of code used to do.

What did tokens not inherit?

The economics. That is where the inheritance stops. It is also the whole story.

Three inversions. Each one breaks something.

A line of code is written once. A token is bought every time. Write a function and it runs a billion times for the cost of electricity. Ask a model the same question a billion times and you pay a billion times. There is no write-once. The marginal cost of software stopped being zero.

A line of code is produced under a plan. A token is spent by whoever opens a window. Engineering cost was set at build time, by a team, against a budget. Token cost is set at run time, by everyone, against nothing. Cost control left the engineering organisation and nobody has picked it up.

A codebase accumulates. Token spend does not. This is the one that matters most and it gets the least attention. A codebase is an asset. It sits on the balance sheet in spirit if not in accounting. Next year's work starts on top of it. Tokens leave nothing behind. Two companies can spend the same on AI and end the year with completely different amounts of retained capability, depending entirely on whether anyone captured what the spend produced.

You can amortise a codebase over its useful life. There is no useful life for a token. It is consumed at the moment it is generated.

Has AI actually compressed software gross margins?

Not at the median. The honest answer matters here.

The popular version of this argument says inference costs are eating software margins. The data does not support it yet.

Benchmarkit's 2026 B2B SaaS and AI-Native Metrics report found median software gross margin holding at 80%, stable across four years. Their conclusion is direct: industry-wide AI infrastructure costs "have not yet compressed software margin at the median".

So if you were expecting the token bill to show up as a dent in gross margin, it has not. Anyone telling you otherwise is describing a forecast, not a measurement.

What the 2026 numbers actually show


Finding

Figure

Source

Median software gross margin

80%, stable through four years

Benchmarkit 2026

R&D as a share of revenue

Fell eight points to 27%, top quartile at 22%

Benchmarkit 2026

Median ARR per employee

$175,000, up 17% year on year

Benchmarkit 2026

Net revenue retention, usage pricing vs seat pricing

108% vs 98%

Benchmarkit 2026

Cost per token, December 2024 to December 2025

Halved, while consumption rose 4.5 times

Bain & Company, June 2026

Headcount opex that agents, tokens and data could replace

20% to 30%

Bain & Company, June 2026

Share of DoorDash code now AI-generated

Roughly two-thirds

DoorDash Q1 2026 earnings

Where did the AI cost actually land?

ON HEADCOUNT!

Look at the second and third rows of that table. R&D fell eight points to 27% of revenue. Revenue per employee rose 17% to a median of $175,000. Benchmarkit attributes the top quartile's 22% R&D figure to something specific: it is "achievable only through AI productivity".

That is the trade. Companies are not paying more in COGS. They are paying less in salaries and more in tokens. The net has so far been favourable enough that the gross margin line never moved.

Bain describes the same trade looking forward. Their scenario has the cost of agents, tokens and data replacing 20% to 30% of today's headcount operating expenses. Benchmarkit is measuring the early part of that in the rearview. Bain is projecting the rest of it.

Here is the problem with a substitution of that size.

You can measure headcount to the dollar and the hour. Most companies cannot measure tokens at all.

Every organisation knows its salary cost per team, per level, per month, going back years. Very few can say what any team spent on AI last quarter. So the most consequential substitution on the P&L is being made with precise data on one side of the trade and effectively none on the other.

Nobody would run a make-or-buy decision that way. That is exactly what this is.

There is a second reason the numbers are hard to trust. Bain found that the cost per token fell by half between December 2024 and December 2025 while consumption rose 4.5 times. Prices dropping does not mean bills dropping. A budget built on the expectation that AI gets cheaper is a budget built on the wrong variable.

What happened last time the industry counted units of production?

Lines of code were used as a productivity measure for the better part of two decades. The practice collapsed for an obvious reason. The count said nothing about whether the software was any good. Once people knew they were measured on it, the count rose without the value following. Function points came next, then story points, then delivery measures like the DORA metrics. The direction of travel was consistently away from counting output and toward measuring outcome.

The token era has skipped a step. We are not over-counting tokens the way the industry once over-counted lines. We are mostly not counting them at all.

That produces a different failure. Over-counting gives you a bad number, which someone will eventually challenge. Not counting gives you no number. Nobody can challenge that, so it quietly gets replaced by an anecdote in the board deck.

What should you measure instead?

Three numbers. The third is the one almost nobody has.

Cost per outcome. Cost per resolved ticket, per merged pull request, per closed deal. Total spend rising or falling tells you nothing on its own, because usage rising and usage collapsing can look identical on a spend chart.

Cost per person and per team. Bain's data suggests the top 5% of users in a company often consume more tokens than the other 95% combined. An average is not a useful denominator when the distribution looks like that.

The substitution ratio. For a given workflow, token spend set against the headcount cost it displaced. This is the number that tells you whether the trade the whole industry is making is working in your company specifically. It requires both halves. Most companies have one.

The first two are hard. The third is impossible without attribution down to the team and the task, which is the work most AI programmes have not done yet.

The close

Lines of code built an industry on the assumption that production was expensive and delivery was free. Tokens invert that assumption without announcing it.

The gross margin line has not caught up yet. That is not reassurance. It means the change is happening somewhere less visible, in the trade between people and tokens, on a P&L where only one of those two is instrumented.

The companies that come out of this well will not be the ones that spent least on AI. They will be the ones that could say what the spending bought.

FAQ

What does "tokens are the new lines of code" mean? It means tokens have become the unit in which software work is produced and paid for, replacing the line of code. The comparison holds for production. It breaks for economics, because code is written once and runs almost free while a token is purchased every time it is generated.

Are tokens a capital cost or an operating cost? An operating cost. A codebase is an asset that next year's work builds on. Token spend leaves nothing behind that can be reused or amortised, so it behaves like consumption rather than investment.

Is AI destroying software gross margins? Not at the median. Benchmarkit's 2026 report found median software gross margin holding at 80% and stable for four years. It concluded that AI infrastructure costs have not yet compressed margins at the median. The effect is visible at the AI-native end of the market rather than across it.

If AI cost is not in gross margin, where is it? Largely in headcount. R&D fell eight points to 27% of revenue in 2026 while revenue per employee rose 17%. Companies are substituting salary cost for token cost. The substitution has so far been favourable enough that gross margin did not move.

Why does falling token pricing not reduce the bill? Because consumption rises faster than price falls. Bain found cost per token halved between December 2024 and December 2025 while tokens consumed grew 4.5 times over the same period.

What is the substitution ratio? Token spend for a workflow measured against the headcount cost that workflow used to require. It answers whether the people-for-tokens trade is working in your company. It needs attribution at the level of the team and the task, which is why few companies can calculate it.

How do you measure token spend across a company? By attributing usage to teams and people across every channel AI arrives through, not only the model APIs on the cloud bill. Guickly returns a complete inventory of AI tools, users and spend, sanctioned and shadow, with no code changes and no engineering dependency.

Get started with us

Let's show you every AI tool, every user, every agent and every dollar in one view.

©2026 Guickly. All rights reserved.

Guickly: AI measurement layer. Every AI tool, every user, every agent and every dollar in one place.

Get started with us

Let's show you every AI tool, every user, every agent and every dollar in one view.

©2026 Guickly. All rights reserved.

Guickly: AI measurement layer. Every AI tool, every user, every agent and every dollar in one place.

Get started with us

Let's show you every AI tool, every user, every agent and every dollar in one view.

©2026 Guickly. All rights reserved.

Guickly: AI measurement layer. Every AI tool, every user, every agent and every dollar in one place.

Get started with us

Let's show you what full AI measurement looks like.

©2026 Guickly. All rights reserved.

Guickly: AI measurement layer. Every AI tool, every user, every agent and every dollar in one place.