Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Estimated Monthly Cost
$1.8667
USD / month
Request charges $0.2
Compute charges $1.6667
Total GB-seconds 100,000

What is the Serverless / Lambda Cost Calculator?

This tool estimates the monthly cost of running a serverless function such as AWS Lambda, Google Cloud Functions or Azure Functions. Serverless platforms typically bill on two axes: a small charge per request (invocation) and a compute charge measured in GB-seconds — the function's allocated memory multiplied by how long it runs. By entering your traffic, average duration, memory size and the pricing your provider charges, you get a clear monthly estimate before you deploy.

How to use it

Enter your expected monthly requests, the average duration of each invocation in milliseconds, and the memory allocated in MB. Then enter your provider's price per request and price per GB-second. The defaults shown approximate common AWS Lambda on-demand pricing ($0.20 per million requests and roughly $0.0000166667 per GB-second). Always confirm current pricing for your region and provider.

The formula explained

$$\text{Cost} = R \cdot p_r + \left(R \cdot \frac{d}{1000} \cdot \frac{m}{1024}\right) \cdot p_g$$ Duration is converted from milliseconds to seconds (\(\div 1000\)) and memory from MB to GB (\(\div 1024\)). The middle term gives total GB-seconds, which is what compute is billed on.

Diagram showing serverless cost split into request cost and compute cost components
Total cost combines a per-request charge and a per GB-second compute charge.

Worked example

Suppose 1,000,000 requests, 200 ms average duration, 512 MB memory, $0.0000002 per request, $0.0000166667 per GB-second. Request charge $$= 1{,}000{,}000 \times 0.0000002 = \$0.20.$$ GB-seconds $$= 1{,}000{,}000 \times 0.2 \times 0.5 = 100{,}000.$$ Compute charge $$= 100{,}000 \times 0.0000166667 \approx \$1.67.$$ Total \(\approx \$1.87\) per month.

Bar showing how memory and duration scale the GB-second compute cost
Compute cost grows with both function memory and execution duration.

FAQ

Does this include a free tier? No — it shows raw cost. AWS Lambda offers a perpetual free tier (1M requests and 400,000 GB-seconds per month) that you would subtract separately.

Why divide memory by 1024? Pricing is per GB-second, and 1 GB = 1024 MB, so memory in MB is converted to GB before computing GB-seconds.

Are data transfer or storage costs included? No. This estimates only invocation and compute charges; egress, logging and storage are billed separately.

Last updated: