Blog 11 min read
Estimate serverless function cost per month
method for overseas founders pricing API/edge functions: separate CDN/bandwidth from invoke/compute, compare Workers CPU-ms vs Lambda GB-s wall-clock vs Vercel Fluid active-CPU+memory, with a dated 15M-request worked example
Overseas SaaS, Next.js and edge-API builders often price CDN bandwidth and object storage first, then ask what the API or edge functions themselves cost. Bandwidth and storage are one stack; invoke and compute are another — requests, CPU-milliseconds, GB-seconds of wall-clock, or active-CPU plus provisioned memory.
This is a method article. It shows how to separate CDN/bandwidth and object-storage egress from function invoke/compute, pick a billing model (Workers CPU-ms vs Lambda Event GB-seconds vs Vercel Fluid active-CPU+memory), run a dated worked example across Cloudflare Workers Paid, AWS Lambda Event Functions and Vercel Fluid, and flag the traps that make apples-to-oranges comparisons. Start from the prior delivery steps: estimate CDN bandwidth cost per month and estimate object storage and egress cost per month. No vendor is recommended. All dollar figures are illustrative, based on public list prices re-checked on 2026-11-03 Asia/Shanghai (developers.cloudflare.com/workers/platform/pricing, aws.amazon.com/lambda/pricing, vercel.com/docs/functions/usage-and-pricing). Lambda figures below are for Event Functions, on-demand, US East (N. Virginia), x86; Vercel Fluid figures use Washington D.C. (iad1) Pro on-demand with no monthly usage credit applied. Other regions and architectures differ — see the traps section. Prices change, so re-check each vendor's current pricing page before you decide.
1. Step 1: separate CDN/bandwidth from invoke/compute
Do not fold function compute into the CDN or object-storage worksheet. Two layers:
- Delivery / storage: GB served from CDN PoPs, origin storage, request classes and egress. Covered in the CDN bandwidth method and the object storage and egress method.
- Invoke / compute: how many times your function runs and how much CPU or memory×time each run bills — requests + CPU-ms, requests + GB-seconds of wall-clock, or active CPU + provisioned memory + invocations.
Monthly function cost ≈ subscription/floor (if any) + request/invocation $ + compute $ − free-tier credits. Bandwidth ≠ function compute. Workers itself lists no egress charge on Workers; Lambda and Vercel can still bill data transfer separately — keep those lines off the compute worksheet until you need them.
2. Step 2: pick the billing model
| Model | What you pay | Typical fit |
|---|---|---|
| Workers Paid (CPU-time edge) | Requests + CPU-ms (+ $5/mo account floor); no charge for wall-clock duration; no Workers egress; static assets free & unlimited; subrequests from a Worker not billed as requests | Edge/API on Cloudflare; I/O-wait heavy handlers where CPU-ms stays low while waiting on DB/API |
| Lambda Event Functions (on-demand wall-clock) | Requests + GB-seconds of wall-clock duration from configured memory (+ Always Free tier); region and x86 vs Arm matter | AWS event integrations (S3, SNS, EventBridge, SQS); when you already live in AWS billing |
| Vercel Fluid (active CPU + memory) | Active CPU (code execution only, not I/O wait) + Provisioned Memory (GB-hours while the instance is alive, including I/O) + Invocations; regional rates | Next.js / Vercel Functions as the default path — compare before assuming “free on Hobby” |
Out of MVP scope (do not invent into the compute line): Workers KV / D1 / Durable Objects / Queues deep meters; Lambda MicroVMs, Web Functions, Managed Instances, Provisioned Concurrency, SnapStart, Durable Functions, Tenant Isolation, ephemeral storage add-on, Lambda@Edge; Vercel Enterprise custom terms.
3. Step 3: dated list prices (re-verified 2026-11-03)
Illustrative list rates used below. Re-check the linked pages; free tiers, rounding, billing cadence and regional multipliers can nudge small workloads.
| Line (list, 2026-11-03) | Cloudflare Workers Paid | AWS Lambda Event (US East x86 on-demand) | Vercel Fluid (iad1, Pro on-demand) |
|---|---|---|---|
| Requests / invocations | 10M included/mo; then $0.30 per additional million | $0.20 per million; Always Free 1M requests/mo | Invocations Pro on-demand $0.60 per million (Hobby includes 1M; MVP below applies no Pro usage credit) |
| Compute | 30M CPU-ms included/mo; then $0.02 per additional million CPU-ms; no wall-clock charge | First-tier on-demand x86 $0.0000166667 / GB-second; Always Free 400,000 GB-s/mo; duration = memory × wall-clock (1 ms granularity) | Active CPU $0.128/hour; Provisioned Memory $0.0106/GB-hour (cle1/pdx1 same as iad1; fra1 $0.184 / $0.0152; sin1 $0.160 / $0.0133 — region disclaimer) |
| Floor / plan | Workers Paid minimum $5/mo per account | No Workers-style floor; free tier can zero small apps | Hobby allowances (4 Active CPU hrs, 360 GB-hrs, 1M invocations) optional; Enterprise custom (out of scope) |
| Egress / notes | No data-transfer (egress) charge on Workers itself; static assets free & unlimited | Data transfer billed separately at EC2 rates when leaving the region — keep off this MVP line | Memory keeps billing during I/O; CPU pauses while waiting |
4. Worked example: 15M requests/month
Assumptions (illustrative, list prices as of 2026-11-03 Asia/Shanghai): 15 million requests per month. Workers uses Cloudflare Example-1 style 7 ms CPU per request. Lambda Event is on-demand US East (N. Virginia) x86 at 50 ms wall-clock @ 512 MB after Always Free. Vercel Fluid is iad1 Pro on-demand with 10 ms active CPU + 1 GB memory + 50 ms instance alive per request, no monthly usage credit applied. No KV/D1/Durable Objects, no Provisioned Concurrency / SnapStart / Lambda@Edge, no Vercel Enterprise.
| Option | Math | Monthly |
|---|---|---|
| Workers Paid (Example 1 style) | Subscription $5.00; requests (15M − 10M) / 1M × $0.30 = $1.50; CPU ((7 ms × 15M) − 30M) / 1M × $0.02 = $1.50 | ≈ $8.00 |
| Lambda Event (US East x86) | Requests (15M − 1M) / 1M × $0.20 = $2.80; GB-s = 15M × 0.050 s × (512/1024) = 375,000; free tier 400,000 GB-s → billable compute $0 | ≈ $2.80 |
| Vercel Fluid (iad1) | Active CPU 15M × 10 ms = 41.667 CPU-hrs × $0.128 = $5.33; memory 15M × 1 GB × 50 ms = 208.333 GB-hrs × $0.0106 = $2.21; invocations 15M × $0.60/M = $9.00 | ≈ $16.54 |
I/O-heavy contrast (same 15M requests): Lambda at 200 ms wall @ 1024 MB → GB-s = 15M × 0.2 × 1 = 3,000,000; billable 2,600,000 × $0.0000166667 ≈ $43.33 + $2.80 requests ≈ $46.13. Vercel Fluid at 5 ms active / 200 ms alive @ 1 GB iad1 → CPU 20.833 hrs × $0.128 ≈ $2.67; memory 833.333 GB-hrs × $0.0106 ≈ $8.83; invocations $9.00 → ≈ $20.50. Workers stays on CPU-ms only — waiting on DB/API does not inflate the Workers CPU line the way Lambda wall-clock or Vercel provisioned memory does. Treat totals as worksheets, not invoices.
5. Step 5: traps (CPU-ms ≠ wall duration; memory during I/O; free tier; $5 floor; regions)
- Workers CPU-ms ≠ Lambda wall duration: comparing 7 ms of CPU to 50–200 ms of wall-clock is apples-to-oranges. Workers does not bill idle wait; Lambda Event does.
- Vercel memory bills during I/O: Active CPU pauses while waiting, but Provisioned Memory keeps charging for the whole instance lifetime until the last in-flight request finishes.
- Lambda free tier hides small apps: 1M requests + 400k GB-s/mo can zero compute for short, low-memory handlers (as in the 15M × 50 ms × 512 MB line above). Do not extrapolate “almost free” past the free tier.
- Workers $5 floor: even a quiet Worker on Paid still owes the account minimum. Free plan (100k requests/day, 10 ms CPU/invocation) is a different product — not the MVP default here.
- Regional multipliers: Lambda duration tiers and request rates vary by region and architecture (x86 vs Arm). Vercel Fluid Active CPU / memory rates differ by region (iad1/cle1/pdx1 $0.128 / $0.0106; fra1 $0.184 / $0.0152; sin1 $0.160 / $0.0133). Re-price the region you actually run in.
Pick from measured request volume, real CPU vs wall vs active-CPU samples, memory size, and whether you need AWS event integrations or a Next.js-on-Vercel default — not from a single vendor landing-page claim.
6. Checklist before you commit
- Finish CDN/bandwidth and object-storage worksheets separately from invoke/compute.
- Choose a billing model: Workers CPU-ms vs Lambda Event GB-s wall-clock vs Vercel Fluid active-CPU + memory.
- Forecast monthly requests and a realistic average duration sample (CPU-ms and/or wall-clock and/or active CPU + instance-alive ms).
- Apply free tiers and floors explicitly ($5 Workers, Lambda 1M req + 400k GB-s, Vercel Hobby allowances or Pro credit).
- Set region + architecture (Lambda) or Fluid region (Vercel); re-price if viewers or compute run outside the MVP region.
- Exclude KV/D1/DO, Provisioned Concurrency, SnapStart, Lambda@Edge and Enterprise custom from the MVP compute line until you need them.
- Re-check every list price on the vendor's current pricing page.
7. Calculators and related reading
Use these calculators to check current serverless / edge function prices.
- Cloudflare Workers cost calculator
- AWS Lambda cost calculator
- Vercel Functions cost calculator
- Serverless compute cost comparison
- Estimate CDN bandwidth cost per month: edge delivery $/GB or plan fees before invoke/compute
- Estimate object storage and egress cost per month: origin storage + egress before edge delivery and functions
Several vendors are listed on purpose. The aim is to compare request + CPU-ms vs GB-seconds vs active-CPU+memory structures, not to pick a vendor in advance. Workers AI token pricing is a different product (inference tokens ≠ Workers request/CPU) — do not mix it into this compute worksheet.
Turn function cost into a clear product site
Serverless math only helps when product pages, APIs and buyer inquiries convert. If you want help with that, contact us or see how the platform fits.
Next step
Want a crawlable inquiry site for that topic?
Tell us the product, target market, and how many sites you need. We build English inquiry pages search engines and AI crawlers can read—then route buyer messages into one admin.
See how Yizhan builds crawlable inquiry sites on the platform page, or leave a request.