Starlight Tools

CDN Cache Hit Ratio Calculator: Origin Bandwidth and Egress Savings

Estimate how much CDN caching reduces origin response traffic, average and peak origin bandwidth, and origin egress cost. Compare your current cache hit ratio with a target scenario using measured delivered data or a requests-times-response-size estimate.

Private by design: calculator values stay in your browser and are not submitted.

Traffic and cache inputs

Use response bytes delivered to viewers for the same period as the hit ratio.

Byte ratios are more reliable for bandwidth offload.

Use a byte share with a byte ratio or request share with a request ratio.

Byte-ratio model: the entered hit ratio applies to cache-eligible response bytes after removing the uncacheable share. Prefer measured byte metrics with a matching denominator. An overall byte-offload metric may already include bypass traffic in its denominator; entering it unchanged alongside a separate bypass share can double-count that reduction. Use a ratio calculated for cache-eligible bytes when entering bypass separately.

Estimated peak origin rate = period average × factor. The current-versus-target comparison holds delivered traffic, period and peak factor constant. The target peak is a scenario estimate: period-wide hit ratios may not represent cache behavior during peak demand.

Leave blank to omit utilization.

Tip: press Ctrl/⌘ + Enter to recalculate. When reading the results, distinguish byte offload from request offload: a byte hit ratio alone cannot establish origin request counts. Request-count estimates require the documented size-neutral assumption or a matching request-based hit ratio and uncacheable request share for the same traffic and period.

Origin offload results

Current origin egress —
Estimated current peak origin bandwidth —
Origin egress avoided now —
Current origin egress savings —
Target scenario
Target origin egress —
Estimated target peak bandwidth —
Additional origin data avoided —
Additional egress savings —
Detailed comparison
Total CDN-delivered data—
No-cache origin egress cost—
Current origin egress cost—
Target origin egress cost—
Average origin bandwidth now—
Average origin bandwidth at target—
Origin traffic change vs current—

Enter valid inputs to calculate origin offload.

Worked example: 25 TB at an 80% hit ratio

In this hypothetical example, with no uncacheable or bypass traffic, 25 TB delivered over 30 days at an 80% cache-eligible byte hit ratio leaves 5 TB of estimated origin response data: 25 TB × (1 − 0.80) = 5 TB. At an illustrative USD 0.09 per decimal GB, not a provider quote, the modeled origin egress cost is USD 450, while 20 TB served from cache avoids USD 1,800 in origin egress charges relative to the USD 2,250 no-cache baseline. These savings exclude CDN delivery, cache-fill, request, invalidation, logging, tax and other charges listed in the FAQ.

Keeping bypass traffic at zero, raising the cache-eligible byte hit ratio to 90% lowers estimated origin response data to 2.5 TB and avoids another 2.5 TB, saving USD 225 relative to the 80% scenario at that same illustrative egress rate. The 30-day average origin rate falls from about 15.43 Mbps to 7.72 Mbps; a 3× peak factor produces planning peaks of about 46.30 Mbps and 23.15 Mbps. In a separate hypothetical bypass scenario, 25 TB delivered with a 20% uncacheable byte share leaves 25 TB × (1 − 0.20) = 20 TB eligible. An 80% cache-eligible byte hit ratio serves 20 TB × 0.80 = 16 TB from cache, leaving 25 TB − 16 TB = 9 TB of origin response data: 5 TB bypass plus 4 TB eligible misses. Even a 100% eligible hit ratio leaves the 5 TB bypass share at the origin.

CDN cache offload formulas

Delivered bytes from requests: viewer requests × average response bytes

Cache-eligible bytes: delivered bytes × (1 − uncacheable share)

Bytes served from cache: cache-eligible bytes × hit ratio

Origin response bytes: delivered bytes − bytes served from cache

Average origin bandwidth: origin bytes × 8 ÷ period seconds

Estimated peak origin bandwidth: average origin bandwidth × peak factor

Origin egress cost: origin bytes ÷ 1,000,000,000 × price per GB

Origin egress savings: cache-served bytes ÷ 1,000,000,000 × price per GB

Data units and billing GB are decimal: 1 KB = 1,000 bytes, 1 GB = 1,000,000,000 bytes, and 1 TB = 1,000 GB. A ratio of 100% produces zero estimated response-body traffic from misses, but real origins can still receive revalidation, control, request-header, range-fill, purge, and logging traffic. Enter uncached or bypass response traffic in the uncacheable share rather than assuming the hit ratio applies to it.

Request hit ratio versus byte hit ratio

CDN dashboards often define cache hit ratio as the percentage of cacheable requests served from cache. That is useful for request load and latency, but it is not automatically the percentage of bytes offloaded. A site can cache many small files successfully while missing a few large downloads, producing a high request hit ratio and a lower byte offload ratio.

If you select Request hit ratio, this calculator uses a size-neutral approximation: hits and misses are assumed to have the same average response size. For egress planning, prefer measured bytes from cache misses, cache-fill bytes, or a provider byte hit ratio.

How to collect better CDN inputs

InputPreferred sourceCommon pitfall
Delivered response data CDN viewer-response bytes for the selected distribution and period Mixing request bytes, uploads, or a different time window into the total
Byte offload Measured cache-served response bytes divided by cache-eligible response bytes for the same traffic and period. The entered hit ratio applies after the uncacheable share is removed; check the denominator before using overall byte-offload or cache-fill metrics. Substituting request hit ratio when response sizes differ materially, or entering an overall byte-offload ratio that already includes bypass traffic alongside a separate bypass share, double-counting that reduction
Peak factor Peak origin bits per second divided by average origin bits per second Using a monthly average to size a burst-sensitive origin path
Egress price Effective marginal origin-to-CDN rate after tiers, credits, and commitments Adding CDN delivery pricing when the field is for origin egress only
Origin capacity The smallest relevant sustained limit across server, NIC, load balancer, and upstream path Treating provisioned bandwidth as guaranteed application throughput

Methodology and source notes

This is a deterministic planning model reviewed on July 28, 2026. Google Cloud documents cache hit ratio as the share of requests served from cache (see Google Cloud CDN overview and cache hit ratio below) and distinguishes cache egress from cache fill (see Google Cloud CDN cache logs and metrics below). AWS defines CloudFront cache hit rate by cacheable requests (see AWS CloudFront metric definitions below) and notes that viewer bytes from misses are an approximation of origin-to-edge bytes that can exclude refresh hits (see AWS CloudFront cache statistics and bytes from misses below).

CDN cache hit ratio FAQs

How does cache hit ratio affect origin bandwidth?

Apply the hit ratio to cache-eligible response bytes, then subtract cache-served bytes from total delivered bytes. With no bypass traffic, a 90% byte hit ratio attributes 10% of response bytes to misses at the origin.

What is the difference between request hit ratio and byte hit ratio?

Request hit ratio counts requests. Byte hit ratio weights each response by size. Use the latter for more accurate bandwidth and egress estimates.

Does the calculator include CDN charges?

No. It models only origin response-data egress at the price you enter. CDN delivery, cache-fill, request, invalidation, logging, tax, and other charges are outside the result.

Why can actual origin traffic be higher?

Revalidations, partial requests, range fills, multi-region cache warming, compression differences, request headers, errors, and provider-specific metric scopes can add traffic not represented by the simple response-byte model.

Can a target hit ratio be lower than the current ratio?

Yes. The calculator then shows additional data and savings as negative, which is useful for modeling a regression or a conservative scenario.

Are my inputs uploaded?

No. The calculations, copy output, and CSV creation run locally in your browser.

Limits and disclaimer

This calculator is an infrastructure planning aid, not a billing quote, performance guarantee, or capacity certification. The byte hit ratio applies to cache-eligible response bytes after removing the uncacheable share. Selecting a request hit ratio uses the size-neutral approximation that hits and misses have the same average response size. Modeled origin response data includes eligible misses and bypass responses; additional origin traffic such as revalidation, request headers, range fills and control traffic is outside this simple response-byte model. Validate production and financial decisions with CDN logs, origin telemetry, provider billing exports, contract pricing, cache behavior, and load tests.

Explore more tools