IPv4 Subnet Calculator
Type an IPv4 address and subnet mask (CIDR like /24 or dotted like 255.255.255.0) to get the network, broadcast and usable IP range.
How it works
The prefix says how many bits belong to the network. A /26 leaves 6 host bits: 2⁶ = 64 addresses, 62 usable after removing the network and broadcast addresses.
Example: 192.168.1.130/26. 130 is 10000010 in binary; clearing the 6 host bits gives 10000000 = 128, so the network is 192.168.1.128, the broadcast 192.168.1.191 and hosts run from .129 to .190.
/31 networks (point-to-point links, RFC 3021) use both addresses and /32 is a single host. The wildcard mask, the inverse of the subnet mask, is what Cisco ACLs and OSPF use.
Formula
Network = IP AND mask · Broadcast = network OR wildcard
Frequently asked questions
How many hosts are in a /24?
254 usable hosts out of 256 addresses.
What is 255.255.255.0 in CIDR?
/24.
Why are the first and last IPs not usable?
The first is the network address and the last is the broadcast address, except in /31 and /32.
Related calculators
Updated on 2026-12-05