IPv4 · IPv6 · runs in your browser
Subnet Calculator
Result
- Address
- 192.168.1.37
- Network
- 192.168.1.0/26
- Broadcast
- 192.168.1.63
- First host
- 192.168.1.1
- Last host
- 192.168.1.62
- Usable hosts
- 62of 64 addresses
More details
- Netmask
- 255.255.255.192
- Wildcard
- 0.0.0.63ACL / OSPF
- Prefix
- /2626 network + 6 host bits
- Class
- Cclassful default /24
- Integer
- 32322358130xC0A80125
- Address scope
- Private-UseRFC 1918not globally reachableclassification of the entered address
Binary breakdown
Select any bit to see its position and weight.
How it is worked out
/26means 26 network bits and 6 host bits (32 in total).- Write 26 ones then 6 zeros: the netmask is
255.255.255.192. - The interesting octet is octet 4, where the mask is
192. Block size: 256 − 192 =64. - Network: 37 AND 192 =
0(the largest multiple of 64 not above 37), so the network is192.168.1.0. - Broadcast: set every host bit to 1, giving
192.168.1.63. - Usable hosts: 2⁶ − 2 =
62. The network and broadcast addresses are not assigned to hosts.
What a subnet calculator does
An IP address and a prefix length (or netmask) together describe a block of addresses. The calculator splits the address into its network part and host part and reports what follows from that split: the network address, the broadcast address, the range you can assign to hosts, how many hosts fit, and the netmask and wildcard you would type into a router.
You can enter the same block in several forms. 192.168.10.0/24, 192.168.10.0 255.255.255.0 and the ACL-style 192.168.10.0 0.0.0.255 all give the same result. IPv6 prefixes such as 2001:db8::/48 work in the same box. The calculator also reports the address type: RFC 1918 private ranges, documentation blocks, link-local and unique local IPv6, plus 6to4 and Teredo addresses with the IPv4 address decoded.
How to calculate a subnet by hand
- Write the prefix as a mask:
/26is 26 ones followed by 6 zeros, which is255.255.255.192. - Find the octet where the mask stops being 255. Here it is the fourth octet, with value 192.
- Block size = 256 − 192 = 64. Networks in that octet start at 0, 64, 128 and 192.
- Pick the block that contains your address:
.37falls in.0–.63, so the network is192.168.1.0and the broadcast is192.168.1.63. - Usable hosts = 26 − 2 = 62.
The subnetting tutorial goes through this from binary up to VLSM, with an exercise at each stage. If you need to split one block into subnets of different sizes, use the VLSM planner.
Questions
How many hosts are in a /24?
A /24 has 256 addresses (28). The first is the network address and the last is the broadcast address, which leaves 254 usable hosts. 192.168.1.0/24
How many hosts are in a /26?
A /26 has 64 addresses and 62 usable hosts. A /24 splits into four /26 blocks that start at .0, .64, .128 and .192. 192.168.1.128/26
What is a wildcard mask?
A wildcard mask is the inverse of a netmask: 0 bits must match and 1 bits are ignored. Cisco ACLs and OSPF network statements use it. The wildcard for 255.255.255.0 is 0.0.0.255. You can type a wildcard straight into the calculator: 10.20.0.0 0.0.255.255.
Can I use a /31 on a point-to-point link?
Yes. RFC 3021 allows both addresses of a /31 to be used on a point-to-point link, with no network or broadcast address. It saves two addresses per link compared with a /30. 10.0.0.0/31
How do I convert a subnet mask to CIDR notation?
Count the 1 bits in the mask. 255.255.255.0 has 24 ones, so it is /24. 255.255.255.192 has 26 ones, so it is /26. The CIDR cheat sheet lists every prefix from /0 to /32.
What is the difference between the network address and the first usable host?
The network address has every host bit set to 0 and names the subnet itself. The first usable host is the next address. In IPv4 the network and broadcast addresses are not assigned to hosts, except in /31 and /32 blocks.
Does IPv6 have a broadcast address?
No. IPv6 uses multicast instead, for example ff02::1 for all nodes on a link. Every address in an IPv6 prefix can be assigned, and this calculator counts them all. The address with an all-zero interface ID is the Subnet-Router anycast address (RFC 4291 §2.6.1), which is why some tools leave it out.
Is 172.32.0.1 a private IP address?
No. The RFC 1918 private block is 172.16.0.0/12, which runs from 172.16.0.0 to 172.31.255.255. 172.32.0.1 is outside it and is a public address. 172.16.0.0/12