IPv4 Subnet Calculator

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

CIDRSubnet maskAddressesUsable hostsTypical use
/24255.255.255.0256254Office or home LAN
/25255.255.255.128128126Split a /24 in two
/26255.255.255.1926462Department or floor
/27255.255.255.2243230Small VLAN
/28255.255.255.2401614Server or DMZ segment
/29255.255.255.24886Small public allocation
/30255.255.255.25242Point-to-point router link
/31255.255.255.25422 (RFC 3021)Point-to-point, no broadcast
/32255.255.255.25511Single 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.

IPv4 tools

IPv6 tools

Network utilities

Frequently asked questions

How do I find the network address of an IP?

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.