# How to compare your sandbox costs with E2B, Daytona, Modal and others
Run `runtime compare --from e2b` (or another provider); it prices your last 30 days of sandboxes at that rival's published rates.
**Runtime bills the CPU your code uses, so the comparison usually shows a
saving of 42% to 88% for an agent that mostly waits on a model.** Those are
the figures for the standard example at each provider's published rates,
checked 23 September 2026 ([pricing](/docs/pricing#published-rate-comparison)).
`runtime compare` replaces the example with your own sandboxes: the same
vCPUs, memory and running time, priced both ways.
## Run the comparison
```bash check
runtime compare --from e2b
```
Without the CLI installed, write `npx withruntime compare --from e2b`. It
takes your settled sandboxes from the last 30 days, prices them at the rates
you were quoted on Runtime, prices the same shape and time at the rival's
published rates, and prints what you save and about how much that is a month,
with the date the rival's rates were checked.
Change the window, or ask about another provider:
```bash no-run
runtime compare --from daytona --days 90
runtime compare --from modal
runtime compare --from fly-machines
```
The same figures, in microdollars, come from the API and from MCP:
```bash no-run
curl -sS "https://api.withruntime.com/v1/usage/compare?provider=vercel&days=30" \
-H "Authorization: Bearer ${RUNTIME_API_KEY}"
```
An agent calls the `runtime_usage_compare` tool.
## Options
| Option | Values |
| -------- | ------------------------------------------------------------------------------------------------------------------- |
| `--from` | `e2b`, `daytona`, `vercel`, `modal`, `cloudflare`, `fly` (Sprites), `fly-machines` and the others in the rate table |
| `--days` | The window, up to 90; 30 by default |
| `--json` | One JSON value, every figure in integer microdollars |
| API | `GET /v1/usage/compare?provider=
&days=` |
| MCP | `runtime_usage_compare` |
## What the example looks like
With no sandboxes yet, the command prices an example and says so. The
standard one is 1,000 runs of a 2 vCPU, 4 GiB sandbox, 60 seconds each, with
20 CPU-seconds of work per run:
```
Runtime CPU 1,000 × 20 s / 3,600 × $0.025 = $0.14
Memory 1,000 × 60 s / 3,600 × 4 × $0.0075 = $0.50
Total $0.64
E2B CPU 1,000 × 60 s / 3,600 × 2 × $0.0504 = $1.68
Memory 1,000 × 60 s / 3,600 × 4 × $0.0162 = $1.08
Total $2.76
```
E2B bills every allocated vCPU for the whole run; Runtime bills the 20
CPU-seconds the code used. With both CPUs busy for the whole minute, the job
costs $1.33 on Runtime and $2.76 on E2B, so Runtime stays cheaper however busy
the sandbox is. E2B's rates are from its [pricing page](https://e2b.dev/pricing),
checked 23 September 2026.
## Work it out by hand
`runtime usage --json` lists each sandbox with its measured
`activeCpuSeconds`, `billedCpuSeconds` and `memoryGiBSeconds`. Runtime's cost
is then:
```text
cost = billedCpuSeconds × $0.025 / 3,600 + memoryGiBSeconds × $0.0075 / 3,600
```
For the other side, use the old provider's own bill where you can see it, or
its published rates from the [comparison pages](/docs/e2b-alternative). Divide
each total by successful jobs, failed attempts and retries included, then
multiply the difference by your jobs a month.
## Mistakes and how Runtime handles them
- **Counting free trial time as a saving.** The comparison prices trial
sandboxes at Runtime's standard rates, what the same work costs on paid
credit, and says how many there were.
- **A short history.** When your first sandbox is more recent than the
window, the month is projected from the days since, and the output says so.
- **Comparing everything.** It compares compute only. Storage, network, plan
fees and free allowances are left out on both sides.
- **Comparing unlike CPUs.** Runtime's default CPU is shared with a
guaranteed floor. If your old provider gave whole cores, compare against
`cpu: "reserved"` ([how to reserve CPU](/how-to/reserve-cpu)).
- **Topping up before recording the switch.** Run
`runtime switch --from e2b` before your first top-up, and that top-up is
matched with credit, up to $100. Afterwards it is too late.
## Related
- [How to switch from E2B in one import](/how-to/switch-from-e2b-in-one-import)
- [Sandbox cost calculator](/calculators/sandbox-cost-calculator) for a
workload you have not run yet
- [E2B pricing calculator](/calculators/e2b-pricing-calculator)
- [Switch from another provider](/docs/migrate)
## Sources
- [E2B pricing](https://e2b.dev/pricing), checked 23 September 2026
- Every other rival's source is listed under
[published rate comparison](/docs/pricing#published-rate-comparison)
Facts on this page were checked on 25 September 2026.