Cloudflare Workers Pricing Calculator






Cloudflare Workers Pricing Calculator: Estimate Your Costs


Cloudflare Workers Pricing Calculator

Estimate your monthly serverless costs for the Cloudflare Developer Platform.



The Free plan has limited resources and does not support Durable Objects for production.

Core Usage



Total number of Worker invocations per month.


The average wall-clock time your Worker code runs for each request.

Workers KV



Number of times a value is read from a KV namespace.


Combined total of write, delete, and list operations.


Total data stored in Workers KV across all namespaces.

Durable Objects



Number of requests sent to any Durable Object.


Total active time multiplied by memory. 1 GB-s is 1GB of memory used for 1 second. (Free plan does not include this).


Total data stored by all Durable Objects. (Free plan does not include this).

$0.00

Estimated Total Monthly Cost

Requests Cost
$0.00

CPU Cost
$0.00

KV Cost
$0.00

Durable Objects Cost
$0.00

Chart: Visual breakdown of estimated monthly costs.

Results copied to clipboard!

What is a Cloudflare Workers Pricing Calculator?

A Cloudflare Workers pricing calculator is a tool designed to help developers and businesses estimate the monthly cost of running their applications on Cloudflare’s serverless platform. Cloudflare Workers provides a powerful, globally distributed environment for running code at the edge, closer to users. However, its usage-based pricing model can be complex. This calculator simplifies the process by breaking down the costs associated with the core components of the platform.

This tool is essential for anyone from individual developers working on hobby projects to large enterprises deploying business-critical applications. By inputting your expected usage for requests, CPU time, data storage (Workers KV), and stateful coordination (Durable Objects), you can get a clear financial forecast. This prevents surprise bills and aids in budget planning, making it a crucial part of managing your serverless architecture effectively.

Cloudflare Workers Formula and Explanation

The total cost is the sum of a base fee (for the paid plan) and the costs of four main components: Requests, CPU Duration, Workers KV, and Durable Objects. Each component has a generous free tier included in the plan, and you only pay for what you use beyond that. The formula is:

Total Cost = Base Fee + Cost(Requests) + Cost(CPU) + Cost(KV) + Cost(Durable Objects)

Below is a breakdown of the variables and their typical values.

Table: Variables in the Cloudflare Workers pricing model.
Variable Meaning Unit Typical Range
Requests The number of times your Worker is triggered. Million Requests 0 – 1,000+
CPU Duration The wall-clock time your code takes to execute. Milliseconds (ms) 1 – 50+
KV Reads Data retrievals from the key-value store. Million Reads 0 – 500+
KV Writes Data writes, deletes, or lists in the key-value store. Million Writes 0 – 50+
KV Storage Total data volume stored in KV. Gigabytes (GB) 0 – 100+
Durable Object Compute Active time multiplied by memory allocation. Gigabyte-Seconds (GB-s) 0 – 1,000,000+

Practical Examples

Example 1: Low-Traffic API Gateway

Imagine a developer runs a small API gateway for a personal project. It handles routing and authentication for a few backend services.

  • Inputs:
    • Monthly Requests: 8 million
    • Average CPU Duration: 3 ms
    • Monthly KV Reads: 5 million (for caching routes)
    • Monthly KV Writes: 0.1 million
    • KV Storage: 0.2 GB
  • Plan: Workers Paid
  • Results: Since all usage falls within the included amounts of the $5 paid plan (10M requests, 30M CPU ms, 10M KV reads, 1M KV writes, 1GB storage), the total cost remains the base fee of $5.00 per month.

Example 2: High-Traffic Real-time Application

A startup runs a collaborative whiteboard application using Durable Objects for real-time state management, with significant traffic.

  • Inputs:
    • Monthly Requests: 100 million
    • Average CPU Duration: 10 ms
    • Monthly KV Reads: 15 million
    • Durable Object Requests: 50 million
    • Durable Object Compute: 2,000,000 GB-s
    • Durable Object Storage: 20 GB
  • Plan: Workers Paid
  • Results: The cost would be calculated on the overages. This highlights the importance of using a cloudflare workers pricing calculator to understand the scaling costs of a stateful, high-traffic application.

How to Use This Cloudflare Workers Pricing Calculator

  1. Select Your Plan: Start by choosing between the ‘Workers Free’ and ‘Workers Paid’ plans. The paid plan starts at $5/month and includes a larger base allowance for all services.
  2. Enter Core Usage: Input your estimated monthly requests (in millions) and the average CPU time (in milliseconds) your worker will take to process a single request.
  3. Add Workers KV Usage: If you use Workers KV for data storage, provide your estimated monthly reads, writes/deletes/lists, and total storage in gigabytes.
  4. Add Durable Objects Usage: For stateful applications, enter your estimated Durable Object requests, compute duration (in GB-s), and storage. Note that Durable Objects are primarily for the paid plan.
  5. Review the Results: The calculator instantly updates your total estimated monthly cost. You can see a breakdown of costs for requests, CPU, KV, and Durable Objects, helping you identify the main cost drivers.
  6. Analyze the Chart: The bar chart provides a visual representation of the cost breakdown, making it easy to see which component contributes most to your bill.

Key Factors That Affect Cloudflare Workers Cost

  • Code Efficiency: The most direct factor on your CPU bill. More efficient code with a lower average CPU duration will significantly reduce costs, especially at scale.
  • Request Volume: The sheer number of invocations is a primary cost driver. Caching strategies at the CDN level can help reduce unnecessary worker executions.
  • Data Access Patterns: For Workers KV, read operations are much cheaper than write operations. Designing your application to minimize writes, deletes, and lists can lead to major savings.
  • State Management Strategy: Durable Objects are incredibly powerful but have a unique pricing model based on active time and memory. Using them efficiently is key to managing costs for real-time or collaborative applications.
  • Plan Selection: The Free plan is excellent for getting started, but its limits are strict. The Paid plan’s $5 base fee unlocks much higher allowances, often making it more cost-effective than trying to stay within the free tier for anything beyond a small hobby project.
  • Storage Volume: While not as expensive as active operations, the total amount of data you store in both Workers KV and Durable Objects contributes to your monthly bill and should be monitored.

Frequently Asked Questions (FAQ)

1. What’s the difference between the Free and Paid plans?
The Free plan offers a small daily allowance of requests and KV operations, ideal for testing and small projects. The Paid plan costs a minimum of $5/month and provides a much larger monthly allowance for all services, plus access to production-ready Durable Objects.
2. Is there a charge for network egress/data transfer?
No, Cloudflare famously does not charge for data egress, which can be a significant cost saving compared to other cloud providers.
3. What is a “CPU millisecond”?
It’s a measure of the actual time your code is running on the CPU (wall-clock time). Cloudflare charges for usage that exceeds the monthly included amount on the paid plan.
4. How is Durable Object “Compute Duration” (GB-s) calculated?
It’s the product of the memory your Object uses and the duration it’s active. For example, an Object using 128MB of RAM that is active for 8 seconds consumes 1 GB-s of compute (128MB is 1/8th of a GB, so 1/8 GB * 8s = 1 GB-s).
5. Are KV reads really that much cheaper than writes?
Yes. On the paid plan, additional reads cost $0.50 per million, while writes, deletes, and lists cost $5.00 per million—a 10x difference. This encourages using KV for frequently read data.
6. Can I set a budget or spending limit?
Cloudflare allows you to set up notifications for your account spending, but does not currently offer hard spending caps that would turn off services automatically.
7. Does this calculator include costs for other Cloudflare services like R2 or D1?
No, this is a specific cloudflare workers pricing calculator. It focuses only on the core Workers platform, including KV and Durable Objects. R2, D1, Queues, and other services have their own separate pricing models.
8. What happens if I exceed the Free plan limits?
If you exceed the daily limits on the Free plan (e.g., 100,000 requests), further requests will be met with an error until the limit resets at 00:00 UTC.

This calculator is an unofficial tool and provides an estimate only. Please refer to the official Cloudflare pricing page for the most accurate and up-to-date information.


Leave a Reply

Your email address will not be published. Required fields are marked *