AWS Lambda Monthly Cost Calculator
Use this estimator to quickly calculate your monthly Lambda bill based on invocations, average duration, memory size, and architecture.
Compute rate: $0.0000166667 per GB-second
Estimate includes Lambda request and compute charges only. It does not include API Gateway, data transfer, CloudWatch logs, Provisioned Concurrency, or taxes.
How AWS Lambda pricing works
AWS Lambda pricing is straightforward once you break it into components. Most workloads pay for two things: the number of requests and the compute time consumed by each invocation. Compute time is measured in GB-seconds, which combines memory allocation and execution duration.
In other words, your cost depends on:
- How many times the function runs each month
- How long each execution takes (in milliseconds)
- How much memory you allocate to the function
- Which architecture you choose (x86_64 or arm64/Graviton)
Request charges
Lambda charges a fixed amount per one million requests. In this calculator, that default is set to $0.20 per million requests, which is a common reference point for many workloads.
Compute charges (GB-seconds)
Compute is billed as:
Invocations × (Duration in seconds) × (Memory in GB)
For example, if a function runs for 200 ms with 1024 MB memory, each invocation consumes 0.2 GB-seconds.
Free tier impact
The calculator can apply the Lambda free tier automatically. That subtracts:
- 1,000,000 requests per month
- 400,000 GB-seconds per month
If your usage is below either threshold, that portion of cost becomes zero.
Formula used by this lambda pricing calculator
This page uses a practical estimate formula:
- Total GB-seconds = invocations × (duration_ms ÷ 1000) × (memory_mb ÷ 1024)
- Billable requests = max(0, requests - free_requests)
- Billable GB-seconds = max(0, GB-seconds - free_GB_seconds)
- Request cost = (billable requests ÷ 1,000,000) × request_rate
- Compute cost = billable GB-seconds × compute_rate
- Total = request cost + compute cost
The result gives you a reliable first-pass estimate for monthly planning.
How to use this calculator effectively
1) Pull real usage data
Use CloudWatch metrics to gather invocation counts and average duration over at least 30 days. Production workloads often vary by day and season, so avoid relying on a single short window.
2) Model high and low scenarios
Try three cases: conservative, expected, and peak. This helps with budgeting and prevents surprises when traffic spikes.
3) Compare x86_64 vs arm64
arm64 (Graviton) is often cheaper for the same workload. If your runtime and dependencies support it, this can lower compute spend immediately.
Practical ways to reduce Lambda cost
- Reduce duration: Optimize code paths, database calls, and package size.
- Right-size memory: More memory can speed execution. Test multiple memory values to find the lowest total cost.
- Use arm64 where possible: Many teams get better price-performance with Graviton.
- Batch work: Fewer, larger invocations can reduce overhead in certain pipelines.
- Avoid unnecessary invocations: Validate event routing rules and retry behavior.
What this estimate does not include
A Lambda function rarely lives alone. Your true serverless bill may also include API Gateway, SQS, SNS, EventBridge, DynamoDB, S3 requests, NAT Gateway, outbound data transfer, and CloudWatch logs. Treat this calculator as a focused Lambda estimator, then layer other services on top for full cost modeling.
Final takeaway
A good lambda pricing calculator helps you make architecture decisions quickly. By entering realistic invocation volume, execution time, and memory settings, you can forecast spend, compare options, and optimize before costs grow. Use this tool early in development and again after each release cycle to keep your serverless budget under control.