Networking and infrastructure
IPv4 subnet calculator
Inspect the network address, broadcast address and host range for an IPv4 CIDR block.
Loading the interactive tool…
When to inspect a subnet
Use the result to check the address range and mask represented by an IPv4 address with a CIDR prefix before configuring or documenting a network.
How to enter an IPv4 CIDR block
- Enter an IPv4 address, a slash, and a prefix from 0 to 32, such as 192.168.1.10/24.
- Calculate to view the network, broadcast, range, and address counts.
Example: a /24 subnet
Inputs
- IPv4 address / prefix
- 192.168.1.10/24
Outputs
- Network
- 192.168.1.0/24
- Subnet mask
- 255.255.255.0
- Broadcast
- 192.168.1.255
- Address range
- 192.168.1.1 – 192.168.1.254
- Total addresses
- 256
- Usable host addresses
- 254
How the network values are derived
The prefix determines which bits belong to the network. The network address is the IP address ANDed with the subnet mask; the broadcast address sets all host bits to 1.
network = address AND mask; broadcast = network OR host-bit mask
Reading the address counts
- Total addresses
- Every address in the calculated block.
- Usable host addresses
- For prefixes below /31, the implementation subtracts the network and broadcast addresses. For /31 and /32, it counts all addresses.
Scope and conventions
- This calculator accepts IPv4 CIDR notation only; it does not calculate IPv6 subnets or determine whether a block is routed or assigned on a real network.
- The /31 and /32 usable-address counts follow this tool's special-case convention and may need to be interpreted in the context of the network design.