Ephemeral Port Range Calculator
Work out ephemeral port range instantly with clear inputs, formula shown and shareable results.
About Ephemeral Port Range Calculator
Each outbound connection consumes a local port for its lifetime plus the TIME_WAIT period, so the sustainable connection rate is port count divided by TIME_WAIT duration. The Linux default of 32768 to 60999 gives 28,232 ports, capping a single source-destination pair at roughly 470 new connections per second with a 60-second TIME_WAIT.
Formula
Port budget
ports = end - start + 1; required = connection rate x TIME_WAIT; max rate = ports / TIME_WAIT
Worked example
With the default values below, Ephemeral Port Range Calculator returns Ephemeral ports available of 28,232. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Range startaccepts 1,024–65,000
- 32,768
- Range endaccepts 1,025–65,535
- 60,999
- Outbound connections per secondminimum 0.001
- 4,000
- TIME_WAIT durationaccepts 1–240 s
- 60 s
Results
- Ephemeral ports available
- 28,232
- Ports needed at this rate
- 240,000
- Maximum sustainable connection rate
- 471 conn/s
- Assessment
- Port exhaustion - widen the range, shorten TIME_WAIT or reuse connections
Step by step
- 1Values used
- 2Port budget
- 3Ephemeral ports available= 28,232
- 4Ports needed at this rate= 240,000
- 5Maximum sustainable connection rate= 471 conn/s
- 6Assessment= Port exhaustion - widen the range, shorten TIME_WAIT or reuse connections
Assumptions and limits
- The result is derived only from the 4 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 whole numbers, 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
Is the limit really per source address?
The tuple is source IP, source port, destination IP and destination port, so the limit applies per destination pair. Many distinct destinations relieve the pressure; one busy upstream does not.
What is the best fix?
Connection reuse through keep-alive, which eliminates most port churn entirely. Widening the range and adding source addresses are secondary measures.
Related Calculators
- Account Lockout Policy Calculator
- Backup Size With Retention Calculator
- Bare Metal Sizing Calculator
- Bash Script Runtime Calculator
- Block Size Overhead Calculator
- Compression Ratio Savings Calculator
- Container vs VM Overhead Calculator
- Context Switch Rate Calculator
- CPU Steal Time Impact Calculator
- CPU Utilisation Calculator
You might also need
- Container vs VM Overhead CalculatorAlso in Linux & System Administration
- CPU Utilisation CalculatorAlso in Linux & System Administration
- Free Memory Estimate CalculatorAlso in Linux & System Administration
- Group Quota CalculatorAlso in Linux & System Administration
- Journal Size CalculatorAlso in Linux & System Administration
- LVM Sizing CalculatorAlso in Linux & System Administration
