Network, broadcast, usable range, mask and wildcard for any IPv4 or IPv6 prefix — with the bit-level working shown and the block split into smaller subnets for you.
IPv4 address
Paste it with the prefix if you have one — 192.168.1.10/24 sets both fields at once.
Try one
IPv6 address
Compressed or expanded, with or without a prefix. Zone IDs like %eth0 are ignored.
Try one
Network
—
Usable host range—
Broadcast address—
Subnet mask—
Wildcard mask—
Total addresses—
Usable hosts—
Class—
Integer value—
Address type—
Hexadecimal—
Reverse DNS zone—
Next block of the same size—
Bit by bit
—
Network
—
Fully expanded—
First address—
Last address—
Total addresses—
Standard /64 LANs inside—
Address type—
Interface identifier—
Reverse DNS zone—
IPv6 has no broadcast address and no reserved network or host address, so every address in the prefix is usable — including the all-zeros one.
Embed this calculator on your site — free
Advertisement
Ad slot A
What the mask is actually doing
An IPv4 address is 32 bits. The prefix length — the /24 in 192.168.1.10/24 — says how many of those bits identify the network. Everything left over identifies a host inside it. That single number is the whole idea; the dotted mask, the wildcard and the host count are all just different ways of writing it down.
With a /24, the first 24 bits are fixed and the last 8 are free. Eight free bits give 28 = 256 addresses, running from 192.168.1.0 to 192.168.1.255. Move the boundary one bit right to /25 and you halve the block to 128 addresses; move it left to /23 and you double it to 512. Every prefix is exactly half the size of the one before it, which is why block sizes only ever come in powers of two.
Why two addresses are missing
In a normal IPv4 subnet the first address is the network address, which names the block itself, and the last is the broadcast address, which reaches every host at once. Neither can be assigned to a machine, so a /24 offers 256 addresses but only 254 usable hosts. That is the −2 in the familiar 2n − 2.
Two prefixes break the rule on purpose. A /31 has no network or broadcast address at all — RFC 3021 lets both of its two addresses be used, which is why router-to-router links are usually /31 rather than the older /30 that wasted half its space. A /32 is a single host route: one address, no range.
Wildcard masks are the mask inverted
A subnet mask marks the bits that must match with 1s. A wildcard mask, used by Cisco access lists and OSPF, marks the bits that are allowed to vary. They are exact complements: 255.255.255.0 becomes 0.0.0.255. If you have one, subtract each octet from 255 to get the other.
Splitting a block
Borrowing bits from the host portion divides one block into several. Take a /24 to a /26 and you borrow two bits, which yields 22 = 4 subnets of 64 addresses each, or 62 usable hosts apiece. The split table above lists them with their ranges so you can hand out one per VLAN or per site without the arithmetic.
Size each subnet to the hosts it actually needs. A point-to-point link needs a /31 or /30, a small office might take a /26, and a flat /24 for six devices burns 248 addresses for nothing. That is variable-length subnet masking — VLSM — and it is simply the practice of not using the same prefix everywhere.
Three ranges are reserved by RFC 1918 for private use and are never routed on the public internet: 10.0.0.0/8 (16.7 million addresses), 172.16.0.0/12 (about a million) and 192.168.0.0/16 (65,536). Home routers almost always hand out a /24 carved from the last one.
A few others show up often enough to be worth knowing. 100.64.0.0/10 is carrier-grade NAT space — if your router reports an address in it, your ISP is sharing one public address among many customers, which is why inbound connections and port forwarding fail. 169.254.0.0/16 is link-local: seeing it means DHCP did not answer. 127.0.0.0/8 is loopback, and 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 are set aside for documentation, which is why they turn up in every networking textbook.
Common prefixes at a glance
A /30 gives 2 usable hosts, a /29 gives 6, a /28 gives 14, a /27 gives 30, a /26 gives 62, a /25 gives 126 and a /24 gives 254. Going the other way, a /23 covers 510 hosts, a /22 covers 1,022 and a /16 covers 65,534. The pattern is the same each step: double the addresses, then subtract the two that are reserved.
IPv6 works differently on purpose
IPv6 has no broadcast address and reserves no network or host address, so every address inside a prefix is usable. The counts stop being meaningful anyway — a single /64, the standard size for one LAN, holds 18.4 quintillion addresses, which is more than the entire IPv4 internet squared. You are not subnetting IPv6 to conserve addresses; you are subnetting it to keep routing and administration tidy.
The convention is straightforward. Providers hand out a /48 or /56 to a site, and the site splits it into /64s, one per network segment. A /48 contains 65,536 /64s, which is more segments than almost any organisation will use. Prefixes longer than /64 break stateless address autoconfiguration, so resist the urge to squeeze a /112 out of a link just because it looks tidier.
Advertisement
Ad slot B
Frequently asked questions
How many usable hosts are in a /24?
254. A /24 contains 256 addresses, but the first is the network address and the last is the broadcast address, so neither can be given to a device. The general rule is 2 to the power of the host bits, minus 2 — here 2⁸ − 2 = 254.
What does /26 mean?
The first 26 bits identify the network, leaving 6 bits for hosts. That is 64 addresses per block and 62 usable ones, with a mask of 255.255.255.192. A /24 divides neatly into four /26s.
What is 255.255.255.0 in CIDR notation?
It is /24. Write the mask in binary and count the leading 1s: 255 is eight 1s, so three full octets of 255 plus a zero octet gives 24. The same method converts any mask — 255.255.255.240 is /28, and 255.255.0.0 is /16.
Why can I not use the first and last address in a subnet?
The first identifies the network itself and appears in routing tables; the last is the directed broadcast, which reaches every host in the block at once. Assigning either to a device causes conflicts. IPv6 dropped this rule, and IPv4 makes an exception for /31 point-to-point links under RFC 3021.
What is the difference between a subnet mask and a wildcard mask?
They are inverses. The subnet mask uses 1s to mark the bits that must match; the wildcard mask uses 0s for the same thing and 1s for the bits free to vary. Cisco access lists and OSPF expect the wildcard form, so 255.255.255.0 is written 0.0.0.255 there.
Do I still need to subnet with IPv6?
Yes, but for structure rather than scarcity. Each network segment gets its own /64 regardless of how few devices sit on it, and a site prefix of /48 or /56 is divided into those /64s. Going longer than /64 breaks stateless autoconfiguration, so /64 is the floor for an ordinary LAN.