What the Cloud Egress vs CDN Savings Calculator does
Cloud providers charge a per-gigabyte egress fee every time data leaves their network for the public internet. Serving a busy website, media library, or software download directly from origin storage or compute can turn that egress line item into one of the largest parts of a cloud bill. A content delivery network (CDN) caches your content at edge locations, so most requests are answered by the CDN at a lower delivery rate and never touch your origin.
This calculator compares the two approaches. It estimates what you would pay serving all traffic straight from cloud egress, what you would pay with a CDN in front (CDN delivery plus the smaller origin egress on cache misses), and the resulting monthly and annual savings.
How to use it
Enter your monthly data delivered to users in gigabytes, your cloud egress rate in dollars per GB, your CDN delivery rate in dollars per GB, and your expected cache hit ratio as a percentage. Public-cloud egress is commonly around $0.08 to $0.12 per GB, while commodity CDN delivery is often $0.01 to $0.05 per GB; a well-tuned static site can reach a 90%+ cache hit ratio. Use rates from your own provider's pricing page for the most accurate result. The calculator returns the direct-egress cost, the total CDN cost, and the savings.
The formula explained
Let T be monthly traffic in GB, R_e the cloud egress rate, R_c the CDN delivery rate, and H the cache hit ratio expressed as a fraction between 0 and 1.
Serving everything directly from cloud egress costs:
$$ D = T \times R_e $$With a CDN, users are served at the CDN rate, and only the cache-miss share still leaves your origin as egress:
$$ C = T \times (1 - H) \times R_e + T \times R_c $$The monthly savings and the savings percentage are then:
$$ S = D - C $$ $$ \text{Savings \%} = \frac{D - C}{D} \times 100 $$A higher cache hit ratio shrinks the origin-egress term, and a lower CDN rate shrinks the delivery term, so both push the savings up.
Worked example
Suppose you deliver 10,000 GB (10 TB) per month, your cloud egress rate is $0.09/GB, your CDN delivery rate is $0.02/GB, and your cache hit ratio is 90%.
Direct egress: 10,000 x $0.09 = $900. With a CDN, the origin only serves the 10% cache-miss share: 10,000 x 0.10 x $0.09 = $90, plus CDN delivery of 10,000 x $0.02 = $200, for a total of $290. The monthly savings are $900 - $290 = $610, about a 67.8% reduction, or roughly $7,320 per year.
Frequently asked questions
Does a CDN always save money? No. If your cache hit ratio is low or your CDN rate is close to your egress rate, the CDN delivery fee plus origin egress on misses can equal or exceed direct egress. Raising the cache hit ratio is usually the biggest lever.
Why is origin egress still charged with a CDN? Every cache miss forces the CDN to fetch the object from your origin, and that fetch leaves the cloud as egress. Only the cached share (the hit ratio) avoids origin egress, which is why a high hit ratio matters so much.
What cache hit ratio should I expect? Static assets and versioned files often cache at 90 to 99%, while highly personalized or rapidly changing content caches poorly. Check your CDN analytics for the actual hit ratio rather than guessing.