Greywell Cyber

Tools

Subnet Calculator for IPv4 and IPv6

Type an address with its prefix, such as 192.168.10.0/26 or 2001:db8::/48, and get the network, broadcast, usable range and host count at once. The maths runs in your browser; nothing is sent to us.

IPv4. Private (RFC 1918). Class C.

Network
192.168.10.0/24
Broadcast
192.168.10.255
First Host
192.168.10.1
Last Host
192.168.10.254
Subnet Mask
255.255.255.0
Wildcard
0.0.0.255
Total Addresses
256
Usable Hosts
254
Binary Mask
11111111.11111111.11111111.00000000

Is an Address in This Subnet?

How to Read the Results

Network
The first address of the block. It names the subnet and is not given to a host.
Broadcast
The last address of an IPv4 block, used to reach every host on it. IPv6 has no broadcast.
First and Last Host
The range you can give to devices. For /31 and /32 every address is usable.
Mask and Wildcard
The mask in dotted form, and its inverse, which Cisco ACLs and OSPF statements use.

Worked Example: Splitting a /24 Into Four

A /24 holds 256 addresses. Borrow two bits and you get four /26 subnets of 64 addresses, each with 62 usable hosts:

SubnetHostsBroadcast
192.168.10.0/26.1 to .62.63
192.168.10.64/26.65 to .126.127
192.168.10.128/26.129 to .190.191
192.168.10.192/26.193 to .254.255

IPv6 Is Different

In IPv6 you do not size subnets to fit hosts: a LAN is a /64, and point to point links are usually /127. The calculator shows the first and last address and the total, and notes when a prefix will not work with SLAAC. The IPv6 design guide explains why.

Questions People Ask

Why Does a /31 Have Two Usable Hosts?

RFC 3021 allows /31 on point to point links, where a network and broadcast address would waste half the block. Both addresses go to the two ends of the link.

Why Does It Refuse 256.1.1.1 or 010.0.0.1?

Each IPv4 part runs from 0 to 255, and leading zeros are read as octal by some systems, so we refuse them rather than guess.

Is My Input Sent Anywhere?

No. Everything is worked out in your browser.

Which Ranges Are Private?

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918). The calculator also names loopback, link local, carrier grade NAT, documentation and multicast ranges.

Practise It

Try the subnetting questions in the networking quiz, or turn a list of subnets into summary routes with the route summariser.

Carving one block into subnets of different sizes? The VLSM planner lays them out largest first and shows what is left.

Planning an addressing scheme for real? See our network and identity design work, or send us the brief.

Found This Useful, or Spotted Something Wrong? Tell Us
Topic

We read every note ourselves. Leave an email only if you would like a reply: we use it for that alone and delete it with the note after 12 months. Cloudflare Turnstile checks you are human. The privacy policy has the detail.