This CGNAT port block calculator sizes carrier-grade NAT for ISPs and hosting networks: how many subscribers can share one public IPv4 address with a given port block size, and how many public addresses you need. It runs entirely in your browser: nothing you type is sent to our server.
Loading the tool… It runs in your browser and needs JavaScript.
Table of Contents
How the CGNAT port block calculator works
With port block allocation, each subscriber gets one or more fixed blocks of ports (for example 512) on a shared public address, instead of single ports. The NAT logs one record per block allocation instead of one per connection, which keeps logs small enough to answer abuse and legal requests.
Choosing the numbers
- Port range: 1024-65535 gives 64,512 usable ports per address; ports below 1024 are normally excluded.
- Block size: 256-2048 ports. Smaller blocks fit more subscribers but run out faster for heavy users (browsers, games, P2P).
- Blocks per subscriber: the maximum one subscriber may hold. The calculator sizes for the worst case where everyone uses the maximum.
- Deterministic NAT (RFC 7422) maps each subscriber to a fixed port range, so no per-allocation logging is needed at all.
Deploy IPv6 alongside CGNAT: traffic to IPv6-enabled services such as Google, Meta and most CDNs then bypasses the NAT entirely.
Using the CGNAT port block calculator
- Enter the usable port range per public address. 1024 to 65535 (64,512 ports) is typical, leaving the well-known ports out.
- Choose the block size per subscriber. 512 to 2,048 ports is common for home users; businesses and heavy users need more.
- Read how many subscribers share one public IPv4 address and how many addresses your subscriber count needs.
- Plan logging: with fixed (deterministic) blocks, a public address, port and time map back to one subscriber without per-connection logs, as described in RFC 7422.
Common mistakes:
- Blocks that are too small: games, video calls and apps that open many connections run out of ports and fail at random.
- Using RFC 1918 addresses between the CGNAT and the subscriber: they clash with customers’ home networks. Use the shared address space 100.64.0.0/10 (RFC 6598).
- No way to answer abuse reports: a complaint names an address, a port and a time, and without block records you cannot find the subscriber.
Related tools and guides: subnet calculator, IPv6 subnet calculator, CIDR to IP range, IP address converter.
How we checked it
We checked the arithmetic on 11-12 October 2026: 64,512 ports in 512-port blocks gives 126 blocks, 31 subscribers per address at 4 blocks each, 7,936 for a 256-address pool and 646 addresses for 20,000 subscribers.
References: the shared CGNAT address space 100.64.0.0/10 is RFC 6598, and deterministic port-block mapping is described in
Frequently asked questions
How many subscribers can share one IPv4 address with CGNAT?
With ports 1024-65535 and 2,048 ports per subscriber, 31 subscribers per address. With 512-port blocks and up to 4 blocks each, also 31 at maximum use, but up to 126 if most subscribers need only one block.
What port block size should I use?
512 to 1,024 ports suits most residential users. Gamers and heavy browser users can exceed 1,000 simultaneous connections, so allow several blocks.
Why use port blocks instead of per-connection NAT?
Logging: a block allocation creates one log record, while per-connection NAT can create millions of records per day that you must store to identify a subscriber later.