IPv4 Subnet Calculator

Address
Mask

Filled bits are the network part; outlined bits are the host part.

Subnet mask
255.255.255.192
CIDR notation
/26
Network address
192.168.10.64
Broadcast address
192.168.10.127
Usable host range
192.168.10.65 – 192.168.10.126
Usable hosts
62
Total addresses
64
Wildcard (inverse) mask
0.0.0.63
Address type
Private (RFC 1918)
CIDR and dotted masks

Enter an IPv4 address and a prefix such as /26 or a mask such as 255.255.255.192. The binary view shows which bits belong to the network and which to hosts.

What the results mean

Worked example: 10.20.30.40 with 255.255.240.0

255.255.240.0 is /20, leaving 12 host bits (4,096 addresses). The third byte 30 is 0001 1110; masking with 240 (1111 0000) keeps 0001 0000 = 16. So the network is 10.20.16.0, the broadcast is 10.20.31.255 and the usable hosts are 10.20.16.1 to 10.20.31.254, 4,094 addresses.

Why /31 and /32 show no broadcast address

For 203.0.113.7/31 on a point-to-point link, 203.0.113.6 and 203.0.113.7 are both usable endpoints. A /32 identifies one address. The calculator shows n/a for broadcast in both cases.

Everything is calculated in your browser. Need the bits of a single number? Use decimal to binary, or AND two values with the bitwise calculator.

Related guides

FAQ

Frequently Asked Questions

How many hosts are in a /24?
A /24 has 2⁸ = 256 addresses. The first is the network address and the last is the broadcast address, leaving 254 usable host addresses.
What is the subnet mask for /26?
255.255.255.192: 26 one-bits followed by 6 zero-bits. It splits a /24 into four subnets of 64 addresses with 62 usable hosts each.
Why does /31 show two usable hosts?
RFC 3021 allows /31 on point-to-point links, where both addresses are usable because no broadcast address is needed. A /32 identifies a single host.
Copied to clipboard!