Enter an IP address and CIDR prefix to instantly calculate network address, broadcast address, usable host range, subnet mask, wildcard mask, and total hosts. Includes subnet splitting and binary visualisation.
| # | Network | First Host | Last Host | Broadcast | Hosts |
|---|
Subnetting is the process of dividing a larger IP network into smaller, more manageable sub-networks. Every IP address on a network has two parts — the network portion (which identifies which network it belongs to) and the host portion (which identifies the specific device). The CIDR prefix length (the number after the slash) tells you how many bits are used for the network portion.
A /24 network, for example, uses 24 bits for the network and 8 bits for hosts — giving 2⁸ = 256 addresses, minus 2 reserved (network address and broadcast), leaving 254 usable hosts. A /25 splits that in half — two subnets of 126 hosts each. Every time you add one to the prefix, you halve the number of hosts but double the number of subnets you can create.
In cloud environments like Azure and AWS, subnetting is particularly important — VNets and VPCs are defined by CIDR blocks, and subnets within them must be planned carefully to allow room for growth, separate security zones, and efficient routing.
The first address in a subnet — identifies the network itself. Cannot be assigned to a host. All host bits are zero.
The last address in a subnet — used to send packets to all hosts on the network. Cannot be assigned to a host. All host bits are one.
All addresses between the network address and broadcast address. These can be assigned to devices. Total usable = 2ⁿ − 2 where n is the number of host bits.
The inverse of the subnet mask — used in access control lists (ACLs) and routing protocols like OSPF. Where the subnet mask has 1s, the wildcard mask has 0s, and vice versa.
CIDR (Classless Inter-Domain Routing) notation represents an IP address and its network prefix in one compact form — for example 192.168.1.0/24. The number after the slash tells you how many bits of the address are the network portion. It replaced the older Class A/B/C system and allows much more flexible network sizing.
Two addresses in every subnet are reserved — the first (network address, all host bits zero) identifies the subnet itself, and the last (broadcast address, all host bits one) is used to send messages to all hosts on the subnet. So a /24 has 256 total addresses but only 254 usable for hosts.
RFC1918 defines three private IP ranges not routable on the public internet: 10.0.0.0/8 (16 million addresses, used in large enterprises), 172.16.0.0/12 (1 million addresses), and 192.168.0.0/16 (65,000 addresses, most common in home and small office networks). These are the address ranges you should always use for internal networks.
A /30 gives exactly 2 usable hosts, making it perfect for point-to-point WAN links — for example between two routers. You need one address for each end of the link. Using a larger subnet wastes addresses. A /31 (RFC3021) can also be used for point-to-point links, with no broadcast address, giving 2 usable addresses from just 2 total.