calculator.onl
Categories50

CDN cost calculator: cache hits and origin traffic

Compare direct delivery and CDN monthly costs with separate byte and request cache-hit ratios and your own flat rates.

A worked example

Serve more bytes from cache and watch origin traffic fall.

Monthly origin traffic with CDN2,000 GBMonthly cost with CDN$519.40Monthly cost without CDN$908.00Monthly savings with CDN$388.60
GB
Total monthly bytes sent to visitors, in decimal GB (1 GB = 1 billion bytes), including hits and misses.

Total monthly visitor requests in millions; enter 20 for 20 million.

%
Percentage of visitor bytes served from CDN cache, reducing origin transfer.

%
Percentage of visitor requests served from CDN cache, reducing origin request count. It can differ from the byte-hit percentage.

USD
Flat origin-transfer rate per decimal GB, applied in both scenarios.

USD
Flat origin rate per million requests, applied in both scenarios.

USD
CDN transfer rate per decimal GB of all visitor traffic, not only cache misses.

USD
CDN rate per million of all visitor requests.

USD
Fixed monthly CDN cost, added once and entered in the same currency as all rates.

Updates as you type

Use a dot or comma for decimals. No thousands separators. Currency selection changes the display unit, not an exchange rate.

YOUR RESULT

Monthly cost with CDN

$519.40

Calculated from your inputs

Monthly cost without CDN$908.00
Monthly savings with CDN$388.60
Monthly origin traffic with CDN2,000 GB
Byte hit ratio for cost parity36.82%
The numbers, at a glance

Calculations run in your browser.
UNDERSTAND THE RESULT

A little context. A clearer answer.

↑ Back to calculator

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

InputWhat it meansExample value
Monthly traffic to visitorsTotal monthly bytes sent to visitors, in decimal GB (1 GB = 1 billion bytes), including hits and misses.10,000 GB
Monthly requests, millionsTotal monthly visitor requests in millions; enter 20 for 20 million.20
Byte cache hit ratioPercentage of visitor bytes served from CDN cache, reducing origin transfer.80 %
Request cache hit ratioPercentage of visitor requests served from CDN cache, reducing origin request count. It can differ from the byte-hit percentage.70 %
Origin price per GBFlat origin-transfer rate per decimal GB, applied in both scenarios.0.09 USD
Origin price per million requestsFlat origin rate per million requests, applied in both scenarios.0.4 USD
CDN price per GBCDN transfer rate per decimal GB of all visitor traffic, not only cache misses.0.03 USD
CDN price per million requestsCDN rate per million of all visitor requests.0.6 USD
Fixed monthly CDN costFixed monthly CDN cost, added once and entered in the same currency as all rates.25 USD

How the calculation works

  1. Enter your monthly traffic, request count and own CDN and origin rates.
  2. Set separate cache hit ratios for bytes and requests.
  3. Compare monthly costs and the byte hit threshold with the request hit ratio held fixed.
The formulaG = [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 enter
Result for this example · Monthly cost with CDN$519.40

This 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.