%3C/text%3E%3C/svg%3E">
💻
💻 Tech & IT

NAT Port Capacity Calculator

Results update as you type.

Your numbers

Understanding the NAT port capacity calculator — concept and principle

Network address translation with port translation (NAPT, often just called NAT or PAT) lets many private devices share a few public IP addresses. Each outgoing connection is given a public IP and source port pair, and the pool of ports is finite. This calculator estimates how many users a set of public addresses can support for a chosen number of ports per user.

Sharing NAT ports among usersOne public IP has ports 1024–65535, 64,512 in all. Giving each user a block of 100 ports serves 645 whole users with 12 ports left over.One public IP, ports shared out in blocks1 public IP10246553564,512 usable portsfirst blocks, enlarged ↓1024–1123100 ports1124–1223100 ports1224–1323100 ports…#645645 users64,512 ÷ 100 = 645.12 · 12 ports left
64,512 ports in blocks of 100 cover 645 users behind one public address.

How it is calculated

Users supported = public IPs × usable ports per IP ÷ ports per user.

The result can have decimals; only whole users count, so round down.

The principle

A TCP or UDP port number is a 16-bit field, so there are 65,536 values per address and per protocol. The NAT device rewrites each private source address and port into a public address and a free port, and remembers the mapping so replies can be sent back. While a mapping is active, that public port is busy. Dividing the pool by the ports each user holds gives the number of users who can be active at once. TCP and UDP have separate port spaces, and some NAT implementations can reuse the same public port for connections to different destinations, so real capacity can be higher than this simple count; others allocate fixed port blocks per subscriber, which matches the formula closely.

Worked example

  1. Inputs: 1 public IP, 64,512 usable ports, 100 ports per user.
  2. Total ports: 1 × 64,512 = 64,512.
  3. Users: 64,512 ÷ 100 = 645.12, rounded down to 645 whole users.
How Users supported changes with Ports per userHow Users supported changes with Ports p…05001,0001,5002,0002,5003,000255075100125150200Example: 645Ports per user
Each point is the calculator re-run with only “Ports per user” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
Ports per userUsers supported
252,580
501,290
75860
100645
125516
150430
200322

How to read the result

If your users regularly hit the port limit, new connections fail or stall, which looks like random web pages not loading. Modern web pages, apps that keep many background connections and peer-to-peer software can each need hundreds of ports at busy moments. To raise capacity, add public IPs, shorten idle timeouts for finished connections, or move traffic to IPv6, where no port sharing is needed.

Common mistakes

Keep in mind: Real capacity depends on the NAT device's mapping behaviour, timeouts, memory and session limits. Use the vendor's documentation and live session counts for production sizing.

Frequently asked questions

Why exclude ports below 1024?

They are the system or well-known ports assigned to standard services, so many NAT devices avoid using them as translated source ports.

How many ports does a typical user need?

It varies widely with usage. Light browsing may need dozens; heavy applications can need hundreds or more at peak.

Does IPv6 need NAT port planning?

Generally not. IPv6 gives each device its own global address, so port exhaustion from sharing does not arise.

Sources: IETF RFC 6335, IANA Procedures for the Management of the Service Name and Transport Protocol Port Number Registry · IETF RFC 4787, NAT Behavioral Requirements for Unicast UDP · IETF RFC 6888, Common Requirements for Carrier-Grade NATs (CGNs)

Checked 8 Nov 2026. Standard formulas and RFC/IEEE definitions, computed locally in your browser — nothing you type is sent anywhere.

💻 All tech & IT tools →🌍 Calculators by country →