MB Networks
IP · CIDR · Subnets
Enter any address and prefix — network range, broadcast, usable hosts, masks, and a bit-level view all update live. Paste CIDR notation like 10.0.0.0/8 to fill both fields at once.
Usable hosts
254
Network
192.168.1.0
Broadcast
192.168.1.255
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Every IPv4 address is 32 bits. A subnet mask (or its shorthand, the CIDR prefix — the /24 in 192.168.1.0/24) splits those 32 bits into a network portion and a host portion. The network portion has to match for two devices to talk directly, without a router in between; the host portion is what's actually available to assign to individual devices. A /24 reserves the first 24 bits for the network, leaving 8 bits — 256 possible values — for hosts. Subtract the network address and broadcast address (neither is assignable to a device) and you get 254 usable hosts, which is exactly what this calculator shows for a default /24.
The binary breakdown at the bottom of the calculator is the actual mechanism, not just a visualization. Every bit set to 1 in the mask is network; every bit set to 0 is host. Bitwise AND the IP address against the mask and you get the network address — the first address in the range, never assignable. Flip every host bit to 1 and you get the broadcast address — the last address, also never assignable. Everything between those two is usable. This is worth understanding once, by eye, because it's the same operation your router, firewall rules, and DHCP scope are all doing under the hood every time they decide whether two addresses are "on the same network."
| Prefix | Subnet mask | Total addresses | Usable hosts | Typical use |
|---|---|---|---|---|
| /30 | 255.255.255.252 | 4 | 2 | Point-to-point link (router-to-router) |
| /29 | 255.255.255.248 | 8 | 6 | Tiny segment, small device cluster |
| /28 | 255.255.255.240 | 16 | 14 | Small VLAN — a handful of servers |
| /27 | 255.255.255.224 | 32 | 30 | Department-sized segment |
| /26 | 255.255.255.192 | 64 | 62 | Larger office segment |
| /25 | 255.255.255.128 | 128 | 126 | Half a /24, common VLAN split |
| /24 | 255.255.255.0 | 256 | 254 | Standard LAN/VLAN default |
| /23 | 255.255.254.0 | 512 | 510 | Two combined /24s, larger sites |
| /16 | 255.255.0.0 | 65,536 | 65,534 | Whole private range (10.x.x.x lab) |
The pattern: each step down in prefix length (say /25 to /24) doubles the address space. Every step up does the opposite — halves it. Getting comfortable with that doubling relationship is most of what "understanding subnetting" actually means in practice.
You're given 10.20.6.130/26 and need to know what network it belongs to. A /26 mask is 255.255.255.192, meaning the last octet splits into blocks of 64 (256÷4, since a /26 leaves 2 host bits worth of subnetting — four /26 blocks per /24). 130 falls in the third block: 0–63, 64–127, 128–191, 192–255. So the network address is 10.20.6.128, broadcast is 10.20.6.191, and usable hosts run from 10.20.6.129 to 10.20.6.190 — 62 addresses. Paste 10.20.6.130/26 into the calculator above to confirm.
Same information, two notations. 255.255.255.0 and /24 describe the identical split of network vs. host bits — CIDR notation just counts the network bits directly instead of writing them out as a dotted-decimal mask. Modern configs almost always use CIDR notation; the mask form still shows up on older hardware and some Windows network adapter settings.
Two addresses in every subnet are reserved and can't be assigned to a device: the network address (all host bits zero — identifies the subnet itself) and the broadcast address (all host bits one — sends to every device on the subnet at once). A /24 has 256 total addresses; subtract those two and 254 remain usable. This −2 rule applies to every prefix length except /31 and /32, which have their own RFC-defined exceptions.
Bitwise AND the address against the subnet mask. In practice: find which block of addresses (sized by the mask) the address falls into. For a /26 (blocks of 64), an address ending in .130 falls in the 128–191 block, so the network address is .128. Paste the address and prefix into the calculator above for the exact breakdown, including the bit-level view.
RFC 1918 defines the three IPv4 ranges set aside for private networks, never routable on the public internet: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. Nearly every home and office network uses addresses from one of these ranges internally, translated to a public address at the router via NAT. This calculator flags any address in these ranges automatically.
Yes, specifically for point-to-point links (router-to-router, for example) — RFC 3021 carves out an exception where both addresses in a /31 are usable, since a link with exactly two endpoints doesn't need a separate network or broadcast address. Most other use cases still need /30 or larger.
Largest is /0 — the entire IPv4 address space, never used in practice. Smallest meaningful subnet is /31 (2 usable addresses, point-to-point only) or /32 (a single host route, not really a "subnet"). Real-world subnets almost always fall between /8 (huge, a whole legacy Class A) and /30 (4 addresses, 2 usable) depending on how many devices actually need to fit.
Class A/B/C are the original 1980s scheme that assigned fixed prefix lengths by an address's first octet (Class C = /24, for example). CIDR replaced that rigid system decades ago — prefix lengths are now chosen independently of address class. This calculator shows the legacy class for reference since the terminology still shows up in older documentation and some exam material, but it has no effect on how modern networks are actually configured.
Related tools
Networking
CIDR Aggregator
Paste a list of IP addresses or CIDR blocks and get the minimal set of CIDR ranges that covers them all. Useful for firewall ACLs and route summarization.
Open →Networking
VLAN / Subnet Planner
Enter a parent network block and the number of subnets needed — get a ready-to-use VLAN table with network addresses, usable hosts, and gateway suggestions.
Open →Networking
DNS Lookup
Look up DNS records, domain registration (RDAP/WHOIS), and IP geolocation for any domain or IP address. No install, no sign-up.
Open →Networking
HTTP Status Code Reference
Searchable HTTP status code reference with descriptions, common causes, and usage notes. Filter by category: 2xx, 3xx, 4xx, 5xx.
Open →Networking
MAC Address Vendor Lookup
Look up the manufacturer of any network device by MAC address. Queries the IEEE OUI database to identify the vendor from the first 3 octets.
Open →Networking
PoE Budget Calculator
Add your PoE devices and check total draw against your switch's power budget — with common PoE class presets for APs, cameras, and phones.
Open →IPv4 only · /31 treated as point-to-point per RFC 3021 · /32 is a host route