Enter an IPv4 address and CIDR prefix to get the network and broadcast addresses, usable host range, subnet mask, wildcard mask, and private or public scope.
Free toolNo signupFormula shown
Saved & recent
CHECK ENTRYSAVED
RESULT
—
FORMULA USEDIP Subnet Calculator
CIDR notation in one paragraph
An address like 192.168.1.50/24 packs two facts together: the address itself and a 24-bit prefix. The prefix says the first 24 bits identify the network and the remaining 8 bits identify hosts inside it. The calculator converts that prefix into a dotted subnet mask (255.255.255.0), derives the block’s boundaries, and checks whether the address belongs to a private range.
How each output is derived
The network address is the IP ANDed with the mask — the block’s first address, all host bits zero. The broadcast address is the same value with all host bits set to one. The usable range runs from network+1 to broadcast−1, because the two endpoints are reserved, giving 2^(32−prefix) − 2 hosts. The wildcard mask is simply the bitwise inverse of the subnet mask, the form ACLs expect.
Private versus public
Three ranges are reserved for private networks by RFC 1918: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. Everything routable on the public internet falls outside them. The scope row also flags loopback (127/8), link-local (169.254/16), multicast (224–239), and the reserved 240+ range.
Worked example
Enter 192.168.1.50 with prefix 24.
Mask /24 = 255.255.255.0; 192.168.1.50 AND mask = 192.168.1.0.
Broadcast = 192.168.1.255; usable range .1 through .254.
Hosts = 2^8 − 2 = 254 — a classic home LAN, private per RFC 1918.
How to use it
Type any IPv4 address that sits inside the subnet of interest.
Enter the CIDR prefix — 24 for a classic class-C LAN, 30 for a link.
Read the network, broadcast, and usable host range.
Copy the subnet or wildcard mask straight into your router or ACL.
Frequently asked questions
How many usable hosts are in a /24 subnet?
254. A /24 has 32 − 24 = 8 host bits, so 256 total addresses; the network and broadcast addresses are reserved, leaving 254 usable hosts from .1 to .254.
What is the difference between a CIDR prefix and a subnet mask?
They encode the same boundary in different forms. The prefix /26 says 26 network bits; the mask 255.255.255.192 is those 26 bits written out as four octets. One is shorthand, the other explicit.
Why does a /31 show two usable addresses?
RFC 3021 permits /31 links for point-to-point connections, skipping the reserved network and broadcast addresses because there is no third host to broadcast to. A /32 represents a single host route with zero room for others.
What does a /32 subnet represent?
A single address — a host route. The network, first, and last usable all collapse to the one address, with zero usable hosts in the conventional sense. It is common in routing tables and firewall rules.
How do I tell if an address is private or public?
Check against RFC 1918: 10.x.x.x, 172.16–31.x.x, and 192.168.x.x are private. Loopback (127.x), link-local (169.254.x), multicast (224–239), and 240+ are special-purpose. Anything else is public routable space.
What is a wildcard mask used for?
It is the inverse of the subnet mask — where the mask has 1s, the wildcard has 0s. Access control lists on Cisco-style gear match addresses with wildcard masks, so /24 corresponds to 0.0.0.255.