IPv4 subnet calculator
Find the CIDR network, subnet mask and host address range.
Calculation inputs
CIDR network
- Subnet mask
- 255.255.255.0
- Usable host addresses
- 254
- Host range
- 192.0.2.1 – 192.0.2.254
- Addresses in block
- 256
- Broadcast address
- 192.0.2.255
QR code
How the calculation works
The prefix fixes the first p bits of the address. A block holds 2^(32 − p) addresses. Up through /30, the first and last addresses are reserved for the network and broadcast. A point-to-point /31 can use both addresses, and a /32 identifies a single address.
Example
For 192.0.2.137/24 the network is 192.0.2.0/24 and the usable range is 192.0.2.1 through 192.0.2.254.
IPv4 subnets and the /31 prefix — RFC 3021Method checked