A little context. A clearer answer.
When this calculator is useful
Use this to test whether a CDN’s delivery charges are offset by lower origin traffic and request charges. A cache hit by request is not necessarily a cache hit of the same share of bytes: large files can dominate transfer volume. Enter the two hit ratios separately. In this model every visitor request and byte incurs CDN charges, while only misses reach the origin; the fixed CDN fee is added once per month. All prices are user inputs, not current provider quotations. If the origin also has storage-tier or retrieval charges, the cloud archive storage and retrieval calculator compares those separately; this CDN estimate includes only the origin transfer and request rates entered here.
What to enter
| Input | What it means | Example value |
|---|---|---|
| Monthly traffic to visitors | Total monthly bytes sent to visitors, in decimal GB (1 GB = 1 billion bytes), including hits and misses. | 10,000 GB |
| Monthly requests, millions | Total monthly visitor requests in millions; enter 20 for 20 million. | 20 |
| Byte cache hit ratio | Percentage of visitor bytes served from CDN cache, reducing origin transfer. | 80 % |
| Request cache hit ratio | Percentage of visitor requests served from CDN cache, reducing origin request count. It can differ from the byte-hit percentage. | 70 % |
| Origin price per GB | Flat origin-transfer rate per decimal GB, applied in both scenarios. | 0.09 USD |
| Origin price per million requests | Flat origin rate per million requests, applied in both scenarios. | 0.4 USD |
| CDN price per GB | CDN transfer rate per decimal GB of all visitor traffic, not only cache misses. | 0.03 USD |
| CDN price per million requests | CDN rate per million of all visitor requests. | 0.6 USD |
| Fixed monthly CDN cost | Fixed monthly CDN cost, added once and entered in the same currency as all rates. | 25 USD |
How the calculation works
- Enter your monthly traffic, request count and own CDN and origin rates.
- Set separate cache hit ratios for bytes and requests.
- Compare monthly costs and the byte hit threshold with the request hit ratio held fixed.
G = [Monthly traffic to visitors]; R = [Monthly requests, millions]; b = [Byte cache hit ratio]/100; h = [Request cache hit ratio]/100; p = [Origin price per GB]; r = [Origin price per million requests]; D = [CDN delivery and fixed cost] = G × [CDN price per GB] + R × [CDN price per million requests] + [Fixed monthly CDN cost]; C₀ = [Monthly cost without CDN] = G × p + R × r; C₁ = [Monthly cost with CDN] = D + G × (1 − b) × p + R × (1 − h) × r; [Monthly savings with CDN] = C₀ − C₁; [Monthly origin traffic with CDN] = G × (1 − b); Δ = D − R × h × r; G × p > 0: b₀ = 100 × Δ/(G × p); 0 < b₀ ≤ 100: [Byte hit ratio for cost parity] = b₀; b₀ ≤ 0: [Already competitive at 0% byte hits]; b₀ > 100: [Not competitive at any byte hit ratio]; G × p = 0, Δ ≤ 0: [Already competitive at 0% byte hits]; G × p = 0, Δ > 0: [Not competitive at any byte hit ratio]A worked example
For 10,000 GB and 20 million requests per month, origin rates of 0.09 per GB and 0.40 per million requests give direct cost 900 + 8 = 908. At 80% byte hits and 70% request hits, the origin still serves 2,000 GB and 6 million requests, costing 180 + 2.40 = 182.40. CDN rates of 0.03 per GB and 0.60 per million requests plus a fixed 25 add 300 + 12 + 25 = 337. Total CDN scenario cost is 519.40, saving 388.60. Holding request hits at 70%, the byte-hit break-even point is about 36.82%. All amounts use one currency and illustrative rates.
Example you can load
What to enterThis is a fixed example; changing the form above does not change these numbers.
Assumptions & limits
Flat user-entered monthly rates in one currency; 1 GB means 1 billion bytes. The same origin rates apply with and without CDN. All visitor traffic and requests incur CDN charges, while only misses incur origin charges. Taxes, tiers, regional mixes, free allowances and provider-specific waivers are excluded.
Frequently asked questions
What does the byte hit threshold mean?
It is the byte cache hit ratio at which the two monthly costs are equal, keeping request hits and all rates fixed. Above it, the CDN costs less; it does not assume the two hit ratios are equal.
Are the example prices live quotations?
No. They illustrate the calculation. Enter your own flat rates in one currency and check any allowances, tiers or origin-transfer waivers separately.
Why can byte and request hit ratios differ?
A cached large object contributes many bytes but only one request. Different object sizes can therefore produce different byte and request hit ratios.