IPv4 subnet and CIDR calculator
Find the network, subnet mask and address range for an IPv4 prefix. Free, without an account, with all calculations on this page.
Calculate an IPv4 subnet
IPv4 only. No scanning or network requests. Your input stays in memory and is not saved or added to the URL. Downloads create a local text file.
Worked example: 192.168.1.42/24.
Subnet result
- Normalized network
- 192.168.1.0/24
- Subnet mask
- 255.255.255.0
- Directed broadcast
- 192.168.1.255
- Full address range
- 192.168.1.0 – 192.168.1.255
- Total addresses
- 256
- Host / endpoint range
- 192.168.1.1 – 192.168.1.254
- Host / endpoint count
- 254
Conventional subnet host count excludes the network and broadcast addresses. Special-purpose address reservations and provider rules can further limit assignment; this is not an allocation check.
How to read a subnet result
A prefix tells you how many of the 32 IPv4 bits belong to the network. The remaining bits identify addresses within that block. Total addresses = 2 to the power of (32 − prefix). A /24 leaves 8 address bits: 2⁸ = 256 addresses.
The normalized network clears those remaining bits. For 192.168.1.42/24, the block starts at 192.168.1.0, the mask is 255.255.255.0 and the last address is 192.168.1.255. In a conventional /24 subnet, the first address identifies the network and the last is the directed broadcast, leaving 254 host addresses.
A /0 spans 0.0.0.0 through 255.255.255.255: 4,294,967,296 total addresses. It is the default-route prefix, not a claim that every IPv4 address is assignable. This calculator reports block arithmetic; it does not check reserved ranges, routing policy, reachability or whether an address is already in use.
Why /31 and /32 are different
/31: two point-to-point endpoints
Under RFC 3021, a /31 on a point-to-point link uses both addresses as endpoints, with no directed broadcast. For 192.0.2.11/31, the network is 192.0.2.10/31 and the endpoints are 192.0.2.10 and 192.0.2.11. Both devices must support this interpretation; do not assume it applies to a shared LAN.
/32: one host route
A /32 selects exactly one address. For 192.0.2.11/32, the network and full range both identify 192.0.2.11, and the mask is 255.255.255.255. There is no separate network or directed broadcast address to subtract.
Planning a subnet does not create a connection. Manage local infrastructure connections in ObserveifyNow. Adding connections and reading supported infrastructure are free; protected infrastructure reads require the native app. Remote changes require a verified Pro entitlement and confirmation.