What do a Next.js app's API routes cost on serverless?
A typical Next.js app whose API/SSR routes serve 3,000,000 requests/month, each ~200 ms at 512 MB plus 100 GB of response egress. That is about 300,000 GB-seconds/month. After each platform's free tier, the cheapest of the GB-second-priced platforms is Scaleway Serverless Functions at roughly $0.33/month (compute + 100 GB egress). Next.js routes are medium-weight. On Vercel the Hobby tier hard-caps usage; at this volume you are typically on a paid plan. Compute is modest; egress and the platform minimum often decide the bill.
Source: Provider pricing pages. Data as of June 2026.
Estimated monthly cost by platform
| Platform | Compute (after free tier) | Egress (100 GB) | Total / month |
|---|---|---|---|
| Scaleway Serverless Functions | $0.33 | varies | $0.33+ |
| Azure Functions | $0.40 | varies | $0.40+ |
| DigitalOcean Functions | $3.89 | varies | $3.89+ |
| AWS Lambda | $0.40 | $9.00 | $9.40 |
| Google Cloud Functions | $10 | varies | $10+ |
| Google Cloud Run | $10 | varies | $10+ |
| Azure Container Apps | $15 | varies | $15+ |
Source: Provider pricing pages. Data as of June 2026.
Assumptions: 3,000,000 requests/month, 512 MB memory, 200 ms duration, 100 GB egress. Totals are after each platform's free tier and exclude platform minimums and regional variation. "+" marks platforms whose egress rate varies. Snapshot June 2026 — verify on the vendor's pricing page.
How this is calculated
GB-seconds = requests x (duration/1000) x (memory/1024)
compute = max(0, requests - free) / 1M x req-fee + max(0, GB-s - free) x GB-s-rate
total = compute + egress GB x egress-rate
These are transparent calculations over the committed June 2026 snapshot rates — see the methodology. Change the numbers for your own workload in the calculator, and read the full breakdown on each provider page.
Frequently asked questions
What do a Next.js app's API routes cost on serverless?
For 3,000,000 requests/month at 512 MB and 200 ms each (about 300,000 GB-seconds) plus 100 GB egress, the cheapest of the GB-second-priced platforms is Scaleway Serverless Functions at roughly $0.33/month after its free tier. Next.js routes are medium-weight. On Vercel the Hobby tier hard-caps usage; at this volume you are typically on a paid plan. Compute is modest; egress and the platform minimum often decide the bill. snapshot captured June 2026.
What assumptions does this estimate make?
Compute = max(0, requests - free requests)/1M x per-1M-request fee + max(0, GB-seconds - free GB-seconds) x per-GB-second rate (CPU-metered platforms add a vCPU-second charge assuming 1 vCPU). Egress = 100 GB x the platform's egress rate. It excludes platform minimums (e.g. Cloudflare Workers Paid $5/mo, Vercel Pro $20/seat), cold-start nuances and regional price differences. See the methodology page.
Which platforms are not shown here?
Two groups are excluded. Resource-time platforms - AWS Fargate, Fly.io Machines, Render, Railway - bill by vCPU-hour, per-minute or instance-hour rather than per request, so a per-request figure is not comparable; for steady, high-utilisation traffic they can be cheaper, while for spiky low-volume traffic the request-priced platforms usually win. The others - Cloudflare Workers, Vercel Functions, Netlify Functions, Deno Deploy, Supabase Edge Functions, Modal - are request-priced but do not publish a clean per-GB-second rate (they bill CPU-time, CPU-ms, per-invocation or a multi-meter model), so we do not estimate their GB-second compute here; see each provider page for its own model.
More scenarios
Last updated: 2026-06-21