Runtime

E2B vs Modal: pricing, isolation and limits

E2B isolates each sandbox in a Firecracker microVM and Modal uses gVisor. The same job costs $2.76 on E2B and $3.97 on Modal.

Runtime runs the same job for 77% less than E2B and 84% less than Modal. 1,000 one-minute runs of a 2 vCPU, 4 GiB sandbox cost $2.76 on E2B, $3.97 on Modal and $0.64 on Runtime, because Runtime bills the CPU your code uses rather than the CPUs it holds. Every Runtime sandbox is a Firecracker microVM with its own kernel, like E2B's. Rates checked 23 September 2026.

Estimated compute cost

77% less than E2B84% less than Modal

2 vCPUs · 4 GiB · 60 s a run · 20 CPU-seconds busy

1,000

Compute only, at list rates checked 23 September 2026 (E2B pricing, Modal pricing). Plan fees, network, taxes and free credits are left out. The worked example below shows the arithmetic.

At a glance

E2B Modal Sandboxes Runtime
Isolation Firecracker microVM, own kernel gVisor, a user-space kernel that intercepts system calls Firecracker microVM, own kernel, every sandbox
CPU $0.0504 per allocated vCPU-hour $0.1419 per physical core-hour (2 vCPUs), request or use $0.025 per vCPU-hour of measured CPU, with a small floor
Memory $0.0162 per GiB-hour $0.0240 per GiB-hour, request or use $0.0075 per reserved GiB-hour
Plan fee Hobby $0; Pro $150 a month Starter $0 with $30 a month of compute; Team $250 a month None; prepaid credit from $10
Free start $100 of usage credit, once $30 of compute a month on Starter 50 sandbox hours, no card
Session length 1 hour on Hobby, 24 hours on Pro Up to 24 hours; snapshots carry state beyond that Leases of up to an hour, extended as often as needed
Pause Files, memory and processes Snapshots carry state past a session Files, memory and processes, kept 1 to 365 days
Setup One call A Modal App is needed outside Modal One call; no app or project
Agent sign-in API key API key Browser approval; no key in the agent's config

Why is Modal more expensive for the same sandbox?

Modal bills whichever is higher, the CPU a sandbox requested or the CPU it used, at $0.00003942 per physical core-second. One physical core is two vCPUs, so a 2 vCPU sandbox pays $0.1419 an hour for its core whether it works or waits. E2B bills every allocated vCPU at $0.0504 an hour, which comes to $0.1008 for the same two vCPUs. Memory follows the same pattern: $0.0240 per GiB-hour on Modal against $0.0162 on E2B.

Runtime bills neither the request nor the allocation. It measures the CPU your code uses, at $0.025 per vCPU-hour, with a floor of a twentieth of a vCPU while it waits on a model.

Cost for the same job

1,000 runs of a 2 vCPU, 4 GiB sandbox (one physical core on Modal). Each run lasts 60 seconds and keeps the CPU busy for 20 CPU-seconds: an agent that mostly waits for a model.

TextE2B      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.76Modal    CPU    1,000 × 60 s × 1 core × $0.00003942 = $2.37         Memory 1,000 × 60 s × 4 × $0.00000667      = $1.60         Total                                         $3.97Runtime  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

At 100,000 runs a month that is $276.00 on E2B, $396.60 on Modal and $63.89 on Runtime. With both CPUs busy for the whole minute, it is $1.33 on Runtime against $2.76 on E2B and $3.97 on Modal, so Runtime is cheaper however busy the sandbox is. A smaller Modal request lowers its figure but also caps what the sandbox can use. Plan fees, disk, network and free credits are left out.

Is gVisor as safe as a microVM?

They draw the boundary in different places. gVisor, which Modal uses, is in its project's words an application kernel that "intercepts application system calls and acts as the guest kernel, without the need for translation through virtualized hardware". A Firecracker microVM, which E2B and Runtime use, gives each sandbox its own Linux kernel behind hardware virtualization. Firecracker vs gVisor covers the trade-off, and Runtime's model is in security.

Which one to pick

  • Pick E2B if you want a microVM per sandbox at a lower rate than Modal, or want to self-host: its runtime is Apache-2.0. Sessions past an hour need the $150-a-month Pro plan.
  • Pick Modal if your sandboxes need GPUs, or you already run Modal functions, web endpoints and scheduled jobs and want sandboxes in the same account and SDK.
  • Pick Runtime for E2B's microVM isolation at under a quarter of E2B's price and under a sixth of Modal's, with no plan fee, memory and processes kept on every pause, and an agent that connects without an API key.

Switch from either one

From E2B, Runtime's SDK runs your code after one import change:

TypeScriptimport { Sandbox } from "withruntime/e2b"; // was: from "e2b"
Pythonfrom withruntime.e2b import Sandbox  # was: from e2b import Sandbox

From Modal, the calls map one to one: modal.Sandbox.create(app=...) becomes Sandbox.create(), sb.exec(*args) becomes exec, Sandbox.from_name becomes Sandbox.getOrCreate(name) and idle_timeout becomes idlePauseSeconds. No App is needed:

Pythonfrom withruntime import Sandboxwith Sandbox.create(funding="trial") as box:    print(box.exec("python3 -c 'print(6 * 7)'", check=True).stdout)

Or give your coding agent the one instruction in migration: it switches the project on a branch, tests it on the free trial and reports the monthly saving. npx withruntime compare --from modal (or --from e2b) prices what you ran at the old provider's rates, and npx withruntime switch --from modal before your first top-up matches that top-up with credit, up to $100. The full side-by-sides are Runtime vs E2B and Runtime vs Modal.

Sources

E2B and Modal pricing pages rechecked 25 September 2026; the rest checked 23 September 2026.

Facts on this page were checked on 25 September 2026.