bestmultiagent

Published 2026-11-18

Multi-agent token cost calculator

SHORT ANSWER

This calculator works out total input tokens, total output tokens, cost per run and cost per 1,000 runs from your own agent count, calls, token sizes and prices. In the calculator's arithmetic, a run where every agent makes as many calls as a single agent would has the agent count times that agent's calls, and its cost rises with them. Each added agent also adds input tokens for its resent copy of the shared context.
Total input tokens (tokens)26,400
Total output tokens (tokens)6,000
Cost per run (currency)0.1692
Cost per 1,000 runs (currency)169.20

What does this calculator work out?

It totals the tokens that one run of your multi-agent system sends and receives, and it prices them at your model's rates. To see the gap against a single agent, run it a second time with 1 agent and the call count that agent would make.

The gap comes mostly from the call count. Microsoft's architecture guide notes that multiagent orchestrations multiply model invocations, with each agent spending tokens on its instructions, context, reasoning, and tool interactions. For background on the pattern itself, see what multi-agent systems are.

What do you enter?

All defaults are illustrative placeholders. Replace each one with a figure from your own traces or billing data.

  • Agents in the run (agents). Count every distinct agent that takes part, including any lead or orchestrator agent. Default 4, range 1 to 50.
  • Model calls per agent (calls). Enter the average number of model calls one agent makes in a run, counting tool-use loops. Default 3, range 1 to 100.
  • Input tokens per call (tokens). This is the prompt, history and tool results sent on one call, averaged. Take it from the usage logs of a real run. Default 2000, range 0 to 200000.
  • Output tokens per call (tokens). This is what the model generates on one call, averaged. Count reasoning tokens here if your provider bills them as output. Default 500, range 0 to 50000.
  • Shared context share of input (percent). This is the part of each call's input that every agent needs, such as the task brief. Frameworks handle it differently. In Mastra, when the parent agent delegates, the subagent receives all messages from the parent conversation. Pydantic AI Harness's SubAgents capability runs each delegation with its own message history. Default 40, range 0 to 100.
  • Input price (currency per million tokens). Copy your model's input price from its own price page. Default 3, a placeholder and not any vendor's price. Range 0 to 1000.
  • Output price (currency per million tokens). Copy your model's output price from the same page. Default 15, also a placeholder. Range 0 to 1000.

How is the result calculated?

The calculator multiplies agents by calls per agent to get total model calls. It then multiplies total calls by the average input per call to get the base input. The shared context is the input per call times the shared percent. The model assumes that each agent after the first receives one extra copy of it as a briefing.

Output tokens are total calls times the output per call. Each token total is divided by one million and multiplied by its price. The 1,000-run figure is the run cost times 1,000.

calls = agents * callsPerAgent
sharedTokens = inputTokensPerCall * sharedContextPercent / 100
totalInputTokens = calls * inputTokensPerCall + (agents - 1) * sharedTokens
totalOutputTokens = calls * outputTokensPerCall
costPerRun = totalInputTokens / 1,000,000 * inputPrice + totalOutputTokens / 1,000,000 * outputPrice
costPer1000Runs = costPerRun * 1000

Worked example

With the defaults, 4 agents making 3 calls each give 12 calls. The shared context is 2000 x 40 / 100 = 800 tokens, so 3 extra agents add 2,400 tokens. Total input is 12 x 2000 + 2,400 = 26,400 tokens, and total output is 12 x 500 = 6,000 tokens. Input costs 26,400 / 1,000,000 x 3 = 0.0792, and output costs 6,000 / 1,000,000 x 15 = 0.09. One run costs 0.1692, and 1,000 runs cost 169.20, in whatever currency your prices use. Setting agents to 1 with the same 3 calls gives 6,000 input tokens, 1,500 output tokens and 0.0405 per run. The four-agent run therefore costs about 4.2 times as much.

What does the result not tell you?

These figures are illustrative arithmetic on the averages you enter, and real runs vary around them. Anthropic says its early research agents made errors like spawning 50 subagents for simple queries. An average hides that kind of spread.

A single input price and a single output price apply to every call. If your agents use different models, run the calculator once per model. Pydantic AI's docs note that monetary cost cannot be reconstructed from aggregate token counts because models may have different pricing.

Context growth sits outside the model as well. Microsoft notes that context windows can grow rapidly in multiagent orchestrations because each agent adds its own reasoning, tool results, and intermediate outputs. Caching discounts and retries are also left out. For factors beyond cost, see the production-readiness picks.

What do readers ask about multi-agent token cost calculator?

How much more does a multi-agent run cost than a single agent?

With the defaults, the four-agent run costs about 4.2 times what a single agent making 3 calls costs. It makes four times the calls and resends shared context to three extra agents. Enter your own single-agent and multi-agent setups to get your ratio.

Is a multi-agent design worth the extra tokens?

It is worth it only when the task pays for it. Anthropic writes that multi-agent systems require tasks where the value is high enough to pay for the increased performance. Microsoft's guide advises that if a single agent can reliably solve your scenario, you should consider that approach, and the overengineering argument covers that case.

Which input moves the cost most?

Calls per agent and the input size per call usually move it most, since total input scales with their product. Halve each in turn to see which one dominates your run.

Which sources does this page cite?