How to Find a Port Number

Computers communicate with the Internet by sending and receiving data through a network connection such as Ethernet or wireless. Different types of communications -- such as for websites, chat, or email -- are exchanged through designated ports, each having its own number. For example, website data might be exchanged at port 1031 and email data at port 25. The Windows 8 network statistics utility enumerates port information on a given computer so that you can find a port number and determine the type of data the computer is exchanging through the port.

Places to Look

Step

Check your program's documentation to find out what port it runs on.

...
Port numbers can often be found in online documentation such as this for Microsoft SQL.
...
The IANA website also displays which protocols are used for each port.

Step

Check the " Service Name and Transport Protocol Port Number Registry" list on the IANA website to find out what port number the service or protocol runs on.

...
Netstat active connections.

Step

Use Netstat. Click the Start button. Type "cmd" in the search box. Hold down "Shift" and "Ctrl" on the keyboard and then press "Enter."

Step

Click "Yes" in the dialog window. Type the following in the command prompt window:

Step

netstat -b -a

Step

Examine the list to find the port associated with the program or service for which you want the port number. Using netstat's "-b" option requires that you have Administrator permissions on your Windows 8 user account.

Use Netstat without Administrator Privileges

Step

Press "Ctrl," "Shift" and "Esc" simultaneously on your keyboard to bring up Task Manager.

...
Task Manager list of PID numbers.

Step

Right-click in the column header to reveal a pop-up list of column names. Select "PID" from the list to display the process ID.

...
The "netstat -ano" list of PID numbers.

Step

Type "cmd" in the Start menu search box. Press "Enter." Type "netstat -ano" at the command prompt. Find the PID you previously noted and see what port it's using.