A port number is a numeric identifier (between 0 and 65535) that tells a computer which application or service should receive specific network data on a device.

Simple idea

When data reaches a device, the IP address gets it to the right machine, and the port number gets it to the right app on that machine.

  • Think of the IP address as a street address and the port number as the apartment number.
  • Together (IP + port + protocol like TCP/UDP) they form a unique “socket” for a connection.

How port numbers work

Port numbers are 16-bit integers, so there are 65,536 possible ports, from 0 to 65535.

  • Different apps “listen” on different ports so they do not mix each other’s traffic.
  • The same port number can exist separately for TCP and UDP because each protocol has its own namespace.

Common port ranges

Port numbers are grouped into well-known ranges used in networking today.

  • Well-known ports (0–1023): Reserved for core services
    • HTTP: port 80
    • HTTPS: port 443
    • SSH: port 22
  • Registered ports (1024–49151): Assigned to specific applications by organizations.
  • Dynamic/Private ports (49152–65535): Used temporarily by clients for outgoing connections.

Why port numbers matter

Port numbers let many networked apps share one IP address without confusion.

  • Your browser, email client, and chat app can all be online at once because each uses different ports.
  • Servers rely on fixed, well-known ports so clients know where to connect (for example, web servers on 80/443).

Information gathered from public forums or data available on the internet and portrayed here.