NAT Session Calculator
Work out NAT and CGNAT port utilisation, the public IP pool size you need, and how close you are to port exhaustion.
About NAT Session Calculator
Each public IPv4 address offers roughly 64512 usable TCP or UDP ports, and every active translation consumes one. Multiplying subscribers by their concurrent session count and a busy-hour peak factor gives the translations you must hold simultaneously; dividing by the per-address port count gives the pool size. Port exhaustion presents as random connection failures that no packet capture on the client explains, and it is the single most common CGNAT outage cause during traffic growth or a NAT pool misconfiguration.
Formula
NAT Session
translation slots = public IPs × 64512 ports; utilisation = (hosts × sessions per host × peak factor) ÷ translation slots.
- 64512
- Ephemeral ports 1024–65535 usable for translation on one public IP
- peak factor
- Multiplier from average to busy-hour concurrency
Worked example
With the default values below, NAT Session Calculator returns Port Pool Utilisation of 87.2%. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Concurrent hosts or subscribersaccepts 1–10,000,000 hosts
- 5,000 hosts
- Average concurrent sessions per hostaccepts 1–5,000 sessions
- 120 sessions
- Public IPv4 addresses in the NAT poolaccepts 1–4,096 addresses
- 16 addresses
- Usable ports per public IPaccepts 1,024–65,535 ports
- 64,512 ports
- Peak-to-average factoraccepts 1–5 ×
- 1.5 ×
Results
- Port Pool Utilisation
- 87.2%
- Peak Translations Required
- 900,000
- Translation Slots Available
- 1,032,192
- Public IPs Required
- 14
- Subscribers per Public IP
- 358
- Exhaustion Verdict
- Within 20% of exhaustion — expand the pool
Step by step
- 1Values used
- 2NAT Session
- 3Port Pool Utilisation= 87.2
- 4Peak Translations Required= 900,000
- 5Translation Slots Available= 1,032,192
- 6Public IPs Required= 14
- 7Subscribers per Public IP= 358
- 8Exhaustion Verdict= Within 20% of exhaustion — expand the pool
Assumptions and limits
- The result is derived only from the 5 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 1 decimal place, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
How is NAT Session calculated?
translation slots = public IPs × 64512 ports; utilisation = (hosts × sessions per host × peak factor) ÷ translation slots. Each public IPv4 address offers roughly 64512 usable TCP or UDP ports, and every active translation consumes one. Multiplying subscribers by their concurrent session count and a busy-hour peak factor gives the translations you must hold simultaneously; dividing by the per-address port count gives the pool size.
Why does NAT Session matter?
Port exhaustion presents as random connection failures that no packet capture on the client explains, and it is the single most common CGNAT outage cause during traffic growth or a NAT pool misconfiguration.
What values do I need to enter?
This calculator takes 5 inputs: Concurrent hosts or subscribers, Average concurrent sessions per host, Public IPv4 addresses in the NAT pool, Usable ports per public IP, Peak-to-average factor. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
How do deterministic port blocks change the maths?
Deterministic NAT or port-block allocation hands each subscriber a fixed block — commonly 512 or 1024 ports — so capacity becomes 64512 ÷ block size subscribers per address regardless of their real usage. You trade statistical efficiency for logging you can actually correlate, which is usually a regulatory requirement.
