IP Subnet Calculator

CIDR ranges, masks and host counts.

Free tools that run in your browser. Nothing you type, open or create is uploaded to NerdBible or anyone else.

BinaryNetwork bits in bold, host bits plain

Everything is worked out in your browser with plain arithmetic; no address you type is looked up or sent anywhere. For /31 and /32 the tool follows RFC 3021 and RFC 4632: a /31 point to point link has two usable addresses and a /32 is a single host.

How to use it

  1. Type an address with its prefix, such as 192.168.1.10/26, or pick the mask from the list.
  2. Read the network, broadcast, host range and host count, and the binary view if you want to see where the split falls.
  3. To divide a range, open Split a network and choose how many subnets or how many hosts each needs. IPv6 has its own tab.

Questions

Why are there two fewer usable hosts than addresses?

In a normal IPv4 subnet the first address names the network and the last is the broadcast address, so neither can be given to a device. A /26 has 64 addresses and 62 usable hosts. The exceptions are /31, used for links between two routers, and /32, a single address.

What is a wildcard mask?

The subnet mask with every bit flipped. Cisco access lists and OSPF use it: 0.0.0.63 matches the 64 addresses of a /26.

Which ranges are private?

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are for private networks and are not routed on the internet. 100.64.0.0/10 is shared address space used by carrier grade NAT, and 169.254.0.0/16 is what a device gives itself when it gets no address.

Why does IPv6 not have a broadcast address?

IPv6 replaced broadcast with multicast, so every address in a prefix can be used. A /64 is the standard size for a single network, which gives about 18 quintillion addresses.

About this tool

About the subnet calculator

Planning a network, writing a firewall rule or setting up a cloud VPC all start with the same question: what does this CIDR block actually contain? Type an address with its prefix, such as 192.168.1.10/26, and the calculator lays it out.

IPv4 results

  • Network address and broadcast address.
  • First and last usable host, and the number of usable hosts.
  • Subnet mask and wildcard mask, as used by Cisco access lists and OSPF.
  • A binary view that shows exactly where the network and host bits divide.

A normal subnet has two fewer usable hosts than addresses, since the first names the network and the last is the broadcast. A /31 point-to-point link and a /32 single host follow their own rules, which the tool applies.

Splitting a network

Open Split a network and say how many subnets you need, or how many hosts each must hold, to get a list of ranges you can hand out.

IPv6

IPv6 has its own tab. There is no broadcast address in IPv6, and a /64 is the standard size for a single network.

Private ranges

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are for private networks and are not routed on the internet.

Everything is plain arithmetic in your browser; no address is looked up or sent.

Related tools