Subnet Calculator

Work out network, broadcast, host range and mask from any CIDR block, and split it into smaller subnets.

Address and prefix

Accepts 10.0.0.1/24, 10.0.0.1/255.255.255.0 or an address and mask separated by a space.

Network192.168.1.128/26
Netmask255.255.255.192
Wildcard mask0.0.0.63
First host192.168.1.129
Last host192.168.1.190
Broadcast192.168.1.191
Usable hosts62
Total addresses64
Class CPrivate (RFC 1918)/26
In binary
Address11000000.10101000.00000001.10000010
Netmask11111111.11111111.11111111.11000000

The ones in the mask are the network part and the zeros are the host part. Reading these two lines together is the whole idea behind subnetting.

Is an address inside this block?
Split into smaller subnets

How to Calculate a Subnet

1

Enter the block

CIDR notation like 10.0.0.1/24 is the usual form, and an address with a dotted mask works too. A bare address is treated as a /24.

2

Read the range

Network and broadcast are the two addresses you cannot give to a host. Everything between them is what you can actually assign.

3

Split or check

Divide the block into smaller subnets to plan a network, or test whether a specific address falls inside the one you have.

Features

Network, broadcast, first and last host, mask and wildcard
Usable host count for every prefix from /0 to /32
Correct handling of /31 point to point links and single host /32s
Binary view of the address next to the mask
Split a block into equal subnets with the ranges listed
Check whether an address falls inside the block
Private, loopback, link local, CGNAT and multicast ranges identified
Free and runs in your browser

Frequently Asked Questions

How many bits from the left belong to the network. A /24 means the first 24 bits identify the network and the remaining 8 identify the host, which is where 254 usable addresses comes from. A bigger number is a smaller network.

The first address in a block is the network identifier and the last is the broadcast address, and neither can be given to a host. That is why a /24 gives you 254 hosts rather than 256, and why a /30, with just four addresses, gives you only two.

Point to point links, defined in RFC 3021. On a link with exactly two ends there is nothing to broadcast to, so both addresses are usable. It saves two addresses per link, which adds up quickly on a router with many interfaces.

Because a /32 is a single address. Writing 203.0.113.9/32 in a rule is the CIDR way of saying this one host and nothing else.

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, from RFC 1918. The middle one catches people out: it is 172.16 through 172.31, so 172.32.0.1 is a public address on the internet, not a private one.

The netmask inverted, and what Cisco access lists and OSPF want instead of a netmask. A /24 has a netmask of 255.255.255.0 and a wildcard of 0.0.0.255. Same information, opposite convention, and a frequent source of rules that match nothing.

Start from the largest group you have to fit, take the smallest prefix that holds it with room to grow, then carve the rest. The split feature lists the resulting blocks so you can copy the ranges straight into your documentation.

Not yet. IPv6 prefix maths is a different exercise: the address is 128 bits, there is no broadcast address, and subnets are almost always /64 regardless of how many hosts are on them.

Need a Custom Tool or Application?

We build production-grade web applications, SaaS platforms, and developer tools. Let's talk about your project.

or book a free call