Subnet Calculator
Calculate subnet mask, network and broadcast address, host range and CIDR for any IPv4 address. Works for /24, /16, /8 and every prefix between 0 and 32 β handy when planning a TP-Link, Asus, Netgear or MikroTik LAN.
Enter an IPv4 address and a CIDR prefix below. The calculator runs entirely in your browser β nothing is sent to our servers.
Subnet Calculator
Enter an IPv4 address and a CIDR prefix below. The calculator runs entirely in your browser β nothing is sent to our servers.
- Subnet mask
- 255.255.255.0
- Network address
- 192.168.1.0
- Broadcast address
- 192.168.1.255
- First usable host
- 192.168.1.1
- Last usable host
- 192.168.1.254
- Total addresses
- 256
- Usable hosts
- 254
Common subnet sizes
| CIDR prefix | Usable hosts | Use |
|---|---|---|
| /30 | 2 | Point-to-point links |
| /29 | 6 | Tiny office segments |
| /28 | 14 | Small VLANs |
| /27 | 30 | Departmental networks |
| /26 | 62 | Mid-size offices |
| /25 | 126 | Larger LANs |
| /24 | 254 | Standard home / SOHO LAN |
| /23 | 510 | Two adjacent /24 networks |
| /16 | 65,534 | Whole 192.168.x.x or campus |
How it works
A subnet mask splits an IPv4 address into a network portion and a host portion. CIDR notation (e.g. /24) tells you how many bits are used for the network. /24 leaves 8 host bits, which gives 256 total addresses (254 usable, since the first is the network address and the last is the broadcast address).
Common use cases
- 1Plan a home or small-office LAN β pick a /24 like 192.168.1.0/24 to get 254 usable hosts on a TP-Link or Asus router, or step up to /23 (510 hosts) for a slightly bigger network.
- 2Split a network into VLANs β divide a /24 into four /26 subnets so guest Wi-Fi, IoT cameras, work laptops and servers each live in their own broadcast domain on the same MikroTik or Cisco switch.
- 3Verify the subnet your ISP handed you β paste the IP and CIDR from your fiber ONT or Starlink dish to confirm the gateway, broadcast and host range before configuring port forwards.
Frequently asked questions
Why does /24 give 256 addresses but only 254 usable hosts?+
A /24 reserves 2 addresses: the network address (first, e.g. 192.168.1.0) and the broadcast (last, e.g. 192.168.1.255). Every host between is usable, leaving 254.
What is CIDR notation?+
CIDR (Classless Inter-Domain Routing) writes a subnet mask as /n β the number of leading 1-bits. /24 means a 24-bit network prefix, equivalent to mask 255.255.255.0.
Public vs private subnet β does it matter for the math?+
No. The arithmetic is the same. The address class only decides whether the range is routable on the open internet (public) or stays inside your home / office network (RFC 1918 private).