Enter any IPv4 address and a subnet mask or CIDR prefix. You get the network address, broadcast address, usable host range, wildcard mask and more. It runs in your browser and nothing you type is sent to a server.
Mask can be written as 255.255.255.192, /26 or just 26.
Network address
Broadcast address
First usable IP
Last usable IP
Usable hosts
Subnet mask
Wildcard mask
CIDR notation
Address class and type
Subnet mask in binary
What a subnet calculator actually tells you
An IPv4 address has 32 bits. The subnet mask decides how many of those bits identify the network and how many are left for hosts. Every device on the same subnet shares the network bits, and that is how a router knows whether a destination is local or has to be forwarded.
The calculator above does the same bitwise AND a router does. The network address is the IP address ANDed with the mask. The broadcast address is the network address with every host bit set to 1. Everything between those two is available to devices, except that the first and last values are reserved in a normal subnet. That reservation is why usable hosts are always two fewer than the block size.
A worked example
192.168.10.77 with /26
A /26 mask is 255.255.255.192, so the block size in the last octet is 256 - 192 = 64. Blocks start at 0, 64, 128 and 192. The address .77 falls inside the 64 block.
Network 192.168.10.64, broadcast 192.168.10.127, usable range 192.168.10.65 to 192.168.10.126, which is 62 hosts. The wildcard mask is 0.0.0.63. Type the same values into the calculator above to check the arithmetic.
Common prefix lengths at a glance
CIDR
Subnet mask
Addresses
Usable hosts
Typical use
/24
255.255.255.0
256
254
Office or home LAN
/25
255.255.255.128
128
126
Split a /24 in two
/26
255.255.255.192
64
62
Department or floor
/27
255.255.255.224
32
30
Small VLAN
/28
255.255.255.240
16
14
Server or DMZ segment
/29
255.255.255.248
8
6
Small public allocation
/30
255.255.255.252
4
2
Point-to-point router link
/31
255.255.255.254
2
2 (RFC 3021)
Point-to-point, no broadcast
/32
255.255.255.255
1
1
Single host route
Mistakes that cost people time
Counting hosts without subtracting two
A /27 holds 32 addresses but only 30 can be assigned to devices. Planning exactly 32 hosts into a /27 leaves you two short.
Assuming classful rules still apply
The class shown in the results (A, B or C) comes from the first octet and is only historical. Modern networks use classless addressing, so a 10.x.x.x address can sit in a /24 just as easily as a /8.
Trusting a calculator over the device in front of you
If a router shows a different range than your calculation, the usual cause is a mistyped mask or an overlapping interface address, not a calculator bug. We wrote up the checks in Router vs calculator showing different subnets. For the theory behind combining ranges, read Supernetting explained.
Mixing up the subnet mask and the wildcard mask
The wildcard mask is the inverse of the subnet mask. Cisco access lists and OSPF network statements use wildcard masks, while interface configuration uses subnet masks. Our wildcard mask calculator converts between them.
All SubnetLab tools
Every tool is free, needs no account and works on a phone. For a longer walkthrough of planning an address space, see the CIDR network planning guide.
Write the IP address and the subnet mask in binary and AND them bit by bit. The result is the network address. In the last octet you can shortcut it: divide the host octet by the block size, drop the remainder, and multiply back.
How many usable hosts are in a /24?
254. A /24 has 256 addresses, minus the network address (.0) and the broadcast address (.255).
What is the difference between a subnet mask and a wildcard mask?
A wildcard mask is the bitwise inverse of the subnet mask. In a subnet mask, 1 means "this bit belongs to the network". In a wildcard mask, 0 means "this bit must match". For 255.255.255.192 the wildcard is 0.0.0.63.
Can I use a /31 or a /32?
Yes. A /31 is allowed on point-to-point links under RFC 3021 and gives two usable addresses with no broadcast. A /32 identifies a single host and is common for loopback interfaces and host routes.
Does SubnetLab store the addresses I enter?
The subnet calculator on this page does all its work in your browser, so the values you type stay on your device.
Written and maintained by Muhammad Kazim Ali, a networking engineer based in Lahore. Examples are checked by hand before publishing. Found an error? Tell us on the contact page. Last reviewed October 2026.
Author Profile
Muhammad Kazim Ali
Muhammad Kazim Ali is a network engineer and technical writer at SubnetLab, where he writes about how computer networks work and how to make sense of them. Most of his work centers on IP addressing and subnetting, the topics that tend to trip people up first, but he also covers CIDR, IPv6, TCP/IP, DNS, and the protocols that connect them. Much of it is written for students who are just starting out and for IT professionals who need a refresher without wading through dense theory.
His approach is simple: explain the idea plainly, work through an example, and then show why it matters on a real network. The courses, guides, and reference material on SubnetLab follow that same pattern, with a practical focus on troubleshooting when things go wrong.
Whether you are learning subnetting for the first time or sharpening your skills on the job, his articles are written to be read, tested against a real network, and returned to when needed.