# Modal vs Vercel Sandbox: pricing, isolation and limits Modal isolates with gVisor and bills requested CPU; Vercel uses Firecracker and bills active CPU, which is cheaper for agents that wait. **Against these two, Runtime cuts the bill by 84% and 70%.** One job, 1,000 one-minute runs of a 2 vCPU, 4 GiB sandbox, costs $3.97 on Modal, $2.12 on Vercel and $0.64 on Runtime. Modal charges for the CPU a sandbox reserves; Vercel and Runtime charge for what it uses, and Runtime's rate for that is about a fifth of Vercel's. Runtime also gives each sandbox a Firecracker microVM kernel of its own. Rates checked 23 September 2026. ## At a glance Vercel's figures are at the rates of its default `iad1` region. | | Modal Sandboxes | Vercel Sandbox | Runtime | | -------------- | --------------------------------------------------------- | ---------------------------------------------------- | -------------------------------------------------------- | | Isolation | gVisor, a user-space kernel that intercepts system calls | Firecracker microVM, own kernel | Firecracker microVM, own kernel | | CPU | $0.1419 per physical core-hour (2 vCPUs), request or use | $0.128 per active CPU-hour | $0.025 per vCPU-hour of measured CPU, with a small floor | | Memory | $0.0240 per GiB-hour, request or use | $0.0212 per provisioned GB-hour | $0.0075 per reserved GiB-hour | | Plan fee | Starter $0 with $30 a month of compute; Team $250 a month | Hobby allowance free; usage beyond it needs Pro | None; prepaid credit from $10 | | Free start | $30 of compute a month on Starter | 5 active CPU-hours and 420 GB-hours a month on Hobby | 50 sandbox hours, no card | | Session length | Up to 24 hours; snapshots carry state beyond that | 45 minutes on Hobby, 24 hours on Pro | Leases of up to an hour, extended as often as needed | | Keeping state | Snapshots | Stop keeps the filesystem; processes start again | Pause keeps files, memory and processes, 1 to 365 days | | Setup | A Modal App is needed outside Modal | A Vercel project and token | One call; no app or project | ## Why does Vercel beat Modal for a waiting agent but not a busy one? Modal charges the larger of what a sandbox asked for and what it used. A 2 vCPU sandbox is one physical core there, so it pays $0.1419 an hour for that core even while it idles on a model call. Vercel charges only active CPU: $0.128 an hour per CPU, which is dearer than Modal's $0.071 per vCPU, but idle seconds are free. So the answer turns on how busy the code keeps the CPUs. At this size Vercel stays cheaper until the sandbox averages about 1.2 busy CPUs out of 2, some 72 CPU-seconds in every minute; above that, Modal's flat charge wins. | 2 vCPU, 4 GiB, 1,000 one-minute runs | Modal | Vercel | Runtime | | ------------------------------------ | ----- | ------ | ------- | | 20 CPU-seconds of work per run | $3.97 | $2.12 | $0.64 | | Both CPUs busy throughout | $3.97 | $5.68 | $1.33 | Runtime measures CPU the way Vercel does, at $0.025 a vCPU-hour, and is the lowest in both rows. ## Cost for the same job Here is the first row worked out: 1,000 runs, 2 vCPU (a single physical core on Modal), 4 GiB of memory (written 4 GB on Vercel), 60 seconds a run and 20 CPU-seconds of actual computing in each. ``` Modal CPU 1,000 × 60 s × 1 core × $0.00003942 = $2.37 Memory 1,000 × 60 s × 4 × $0.00000667 = $1.60 Total $3.97 Vercel CPU 1,000 × 20 s / 3,600 × $0.128 = $0.71 Memory 1,000 × 60 s / 3,600 × 4 × $0.0212 = $1.41 Total $2.12 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 ``` Over a month of 100,000 runs, Modal comes to $396.60, Vercel to $212.44 and Runtime to $63.89. If both CPUs are busy for the whole minute instead, the job is $1.33 on Runtime, $3.97 on Modal and $5.68 on Vercel. Plan fees, creation charges, disk, network and free allowances are not in these totals. ## gVisor or Firecracker? Modal runs sandboxes under gVisor, a user-space kernel that intercepts the program's system calls. Vercel and Runtime run each sandbox as a Firecracker microVM with its own Linux kernel. [Firecracker vs gVisor](/compare/firecracker-vs-gvisor) explains where each draws the boundary. ## Which one to pick - **Modal**, when the sandboxes need GPUs, or when the team already runs Modal functions, web endpoints and cron jobs and wants sandboxes in the same place. Outside Modal, a sandbox needs a Modal App first. - **Vercel Sandbox**, when the product is deployed on Vercel already, or sandboxes must sit in many places: 19 regions, and up to 10,000 at once on Pro. - **Runtime**, when the job is an agent that mostly waits: a microVM per sandbox, CPU by use at about a fifth of Vercel's rate, pause and [forks](/glossary/sandbox-fork) that carry memory and live processes, and no app, project or token to create first. ## Moving to Runtime Vercel Sandbox code keeps working with a changed import, and stops needing a Vercel project or token: ```ts no-run import { Sandbox } from "withruntime/vercel"; // was: from "@vercel/sandbox" ``` ```python no-run from withruntime.vercel import sandbox # was: from vercel import sandbox ``` Modal code is ported call by call. `modal.Sandbox.create(app=...)` turns into `Sandbox.create()`, `sb.exec(*args)` into `exec`, `Sandbox.from_name` into `Sandbox.getOrCreate(name)`, and `idle_timeout` into `idlePauseSeconds`: ```python from withruntime import Sandbox with Sandbox.create(funding="trial") as box: print(box.exec("python3 -c 'print(6 * 7)'", check=True).stdout) ``` A coding agent can do either port from the single instruction in [migration](/docs/migrate), working on a branch and checking the result on the free trial. Before the first top-up, `npx withruntime switch --from modal` or `--from vercel` matches it with credit, up to $100. The long form is in [Runtime vs Modal](/docs/modal-sandbox-alternative) and [Runtime vs Vercel Sandbox](/docs/vercel-sandbox-alternative). ## Sources Modal and Vercel pricing pages rechecked 25 September 2026; the rest checked 23 September 2026. - [Modal pricing](https://modal.com/pricing), [Modal resources and billing](https://modal.com/docs/guide/resources), [Modal Sandboxes](https://modal.com/docs/guide/sandbox), [Modal security](https://modal.com/docs/guide/security) - [Vercel Sandbox pricing](https://vercel.com/docs/sandbox/pricing), [Understanding Vercel Sandboxes](https://vercel.com/docs/sandbox/concepts) - Runtime [pricing](/docs/pricing) Facts on this page were checked on 25 September 2026.