Home / Dev & AI / API & Backend Cost / API Cost Calculator

API & Backend Cost

API Cost Calculator

Estimate what your API costs to run each month. Enter request volume, price per million requests and average response size, and see request fees, bandwidth and how the bill grows with traffic.

Estimated monthly cost

$0

Request cost
Bandwidth cost
Cost per 1,000 requests
Data transferred / month
Requests per month
Annual estimate

Request fees vs bandwidth

Small responses stay request-bound, big JSON or media payloads tip the bill toward egress.

Cost as traffic grows

What this endpoint costs if monthly volume doubles, 5x or 10x.

What the API Cost Calculator does

Running an API has two recurring costs that scale with traffic: the compute or per request fee for handling each call, and the bandwidth cost of sending responses back over the network. This API cost calculator combines both into a single monthly figure and shows how each part contributes.

The per request price stands in for whatever charges scale with call volume, whether that is a managed gateway fee, serverless invocation cost or your own compute amortised per call. Bandwidth is estimated from your average response size and egress rate, since large JSON or media payloads can quietly dominate a bill.

Heads up on pricing. The rates built into this tool are public list estimates for July 2026 and can change without notice. Providers also offer batch discounts, prompt caching and volume tiers that lower real costs, so treat the output as a planning estimate, not a quote.

The formula

request cost = requests ÷ 1,000,000 × price per million
bandwidth cost = requests × avg KB ÷ 1,000,000 × egress price per GB
total = request cost + bandwidth cost

Worked example

For 5,000,000 requests a month at $1 per million and 40 KB average responses at $0.09 per GB, request cost is 5 × $1 = $5 and bandwidth is 5,000,000 × 40 ÷ 1,000,000 = 200 GB × $0.09 = $18, for about $23 a month.

Typical per-request and egress rates (2026 estimates)

Cost componentTypical rate
Managed HTTP gateway$1.00 per million requests
Managed REST gateway$3.50 per million requests
Serverless invocation$0.20 per million requests
Egress bandwidth$0.08 to $0.12 per GB
Egress via CDN$0.02 to $0.05 per GB

Rates are 2026 estimates and vary by provider and region. Serving responses through a CDN usually lowers egress cost sharply.

Ways to lower your API and backend costs

Frequently asked questions

How do I calculate API cost?

Add the per request fees to the bandwidth cost. Multiply requests by your per request rate, then add response size times requests times the egress rate. This tool does both automatically.

What usually dominates an API bill?

For small JSON responses, the per request fee. For large payloads or media, bandwidth. The breakdown chart shows which applies to you.

How can I lower API costs?

Serve responses through a CDN, compress payloads, cache common responses, and reduce chatty endpoints that force many small calls.

Does this include server costs?

The per request price can represent your amortised compute. For dedicated always-on servers, use the API hosting cost calculator instead.

Are the rates accurate?

They are 2026 planning estimates. Confirm your provider gateway, compute and egress rates for an exact figure.

Related calculators