NETWORKING / IPv4

IP Subnet Calculator for IPv4: CIDR, Subnet Mask, Wildcard and VLSM Planner

Enter an address with a prefix, mask, wildcard or host count to see its full subnet. You can also plan addresses for several networks of different sizes, or roll a list of networks up into one summary route.

Enter an IPv4 address

/
/

The split table shows up to 256 smaller networks inside the one you entered.

What you can use it for

Splitting a small office network

Putting staff, guests, cameras and printers on separate subnets makes firewall rules simpler and keeps one group’s broadcast traffic away from the others. Say you have 192.168.10.0/24 and need room for 100 staff devices, 50 guests, 20 cameras and 10 printers or switches:

PurposeRequired hostsAllocated subnetUsable rangeBroadcast
Staff100192.168.10.0/25192.168.10.1 – 192.168.10.126192.168.10.127
Guest Wi-Fi50192.168.10.128/26192.168.10.129 – 192.168.10.190192.168.10.191
Cameras20192.168.10.192/27192.168.10.193 – 192.168.10.222192.168.10.223
Printers and management10192.168.10.224/28192.168.10.225 – 192.168.10.238192.168.10.239

That still leaves 192.168.10.240/28 spare for later. In practice you’d then give each subnet its own VLAN, gateway and firewall policy.

Checking a device’s address

If you know a device’s IP and prefix, the calculator shows the whole subnet around it. That tells you whether another address is local and whether a static IP you’re about to set is in range. For the default 192.168.10.37/24 (mask 255.255.255.0), you get:

  • Network address: 192.168.10.0
  • Usable range: 192.168.10.1 to 192.168.10.254
  • Broadcast address: 192.168.10.255
  • Usable hosts: 254

Anything inside that range is normally reached directly, and anything outside goes via the router. VLANs, routing tables and firewalls can still change what actually gets through.

Planning several VLANs from one block

Here’s what the VLSM planner gives you for its default input, 10.20.0.0/22 shared between five networks:

NetworkRequired hostsAllocated subnetCapacityUnused host capacity
Office20010.20.0.0/2425454
Wi-Fi10010.20.1.0/2512626
Voice5010.20.1.128/266212
Cameras2410.20.1.192/27306
Management1010.20.1.224/28144

The five subnets use 496 of the 1,024 addresses without overlapping, leaving 528 free for future networks. Before rolling it out, write down each subnet’s gateway, DHCP exclusions and any addresses reserved for infrastructure.

How IPv4 subnetting works

An IPv4 address is 32 bits long. The prefix says how many of those bits identify the network: a /24 locks the first 24 and leaves 8 for devices. A subnet mask such as 255.255.255.0 marks exactly the same boundary, just written in dotted decimal.

Network, broadcast and usable addresses

Set every host bit to 0 and you get the network address. Set them all to 1 and you get the broadcast address. Everything in between is for devices. Two exceptions: a /31 uses both of its addresses for the two ends of a point-to-point link, and a /32 is a single address.

What VLSM does

Variable Length Subnet Masking gives each network a prefix sized to fit it, rather than one size for all. Placing the biggest blocks first keeps the plan tight and leaves the leftover space in one usable chunk.

Wildcard masks for ACLs and OSPF

Router access lists and OSPF network statements don’t take a subnet mask. They want a wildcard, which flips the logic: a 0 bit says “this part of the address has to match” and a 1 bit says “anything goes here”.

To get one, take each octet of the subnet mask away from 255. Say you want an access list to cover 10.4.8.0/21. Its mask is 255.255.248.0, so the wildcard is 0.0.7.255, and the rule will catch everything from 10.4.8.0 to 10.4.15.255.

The calculator shows the wildcard with every result. You can also start from a wildcard you’ve found in a router config and it will tell you which subnet it covers.

IPv4 CIDR, subnet mask and wildcard chart

Here are the prefixes you’ll meet most in private networks, VLANs and router links. Usable hosts leave out the network and broadcast addresses, apart from /31 and /32, which work differently.

PrefixSubnet maskWildcardTotal addressesUsable hosts
/16255.255.0.00.0.255.25565,53665,534
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122 on a point-to-point link
/32255.255.255.2550.0.0.011 host route

CIDR and route summaries

CIDR writes a network as an address plus a prefix length, such as 10.20.0.0/22. Routers match traffic against these prefixes, so a run of neighbouring networks can often be advertised as one shorter route instead of many. Paste your list into Route summary mode and it finds the smallest prefix that covers them all.

Watch for gaps. If your networks aren’t back to back, or don’t start on the right boundary, the summary will also cover addresses you never listed. The calculator tells you how many, so you can decide whether it’s safe to advertise.

Subnetting practice questions

These cover the same skills as CCNA-style subnetting labs. The addresses and answers are our own, and each one can be checked with the calculator.

For 10.44.7.201/27, what are the network address, broadcast address and usable range?

A /27 works in blocks of 32 in the last octet. 201 falls in the 192–223 block, so the network is 10.44.7.192, the broadcast is 10.44.7.223 and the usable range is 10.44.7.193 to 10.44.7.222. That’s 30 usable hosts.

A device is set to 172.20.91.14 with mask 255.255.255.240. Is that a valid host address?

Yes, just. The mask is a /28, so blocks are 16 addresses wide. 14 sits in the 0–15 block, which makes 172.20.91.0 the network and 172.20.91.15 the broadcast. That leaves 172.20.91.14 as the last usable address.

What subnet contains 172.31.150.9/21?

A /21 has the mask 255.255.248.0, so the third octet steps in 8s. 150 falls in the 144–151 block. The network is 172.31.144.0, the broadcast is 172.31.151.255 and the usable range runs from 172.31.144.1 to 172.31.151.254, giving 2,046 hosts.

How would you split 10.8.4.0/24 into equal subnets of at least 28 hosts each?

Use /27s. Each has 32 addresses and 30 usable hosts, and a /24 holds eight of them. They start at 10.8.4.0, .32, .64, .96, .128, .160, .192 and .224.

What is the smallest subnet that fits 500 hosts?

A /23. It leaves 9 host bits, giving 512 addresses and 510 usable hosts. The mask is 255.255.254.0. A /24 tops out at 254, so it’s too small.

Is 192.168.4.255 a usable address in 192.168.4.0/23?

Yes. A /23 runs from 192.168.4.0 to 192.168.5.255, so 192.168.4.255 sits in the middle and is an ordinary host. Only 192.168.4.0 and 192.168.5.255 are reserved. This one catches people who assume anything ending in .255 is a broadcast.

Using VLSM, how would you fit networks of 60, 28 and 12 hosts plus two point-to-point links into 172.18.40.0/24?

Biggest first: 172.18.40.0/26 for 60 hosts, 172.18.40.64/27 for 28, 172.18.40.96/28 for 12, then 172.18.40.112/30 and 172.18.40.116/30 for the two links. Everything from 172.18.40.120 upwards is still free.

Can 10.50.0.128/25 and 10.50.0.192/27 both be assigned?

No. The /25 covers 10.50.0.128 to 10.50.0.255, and the /27 from 10.50.0.192 to 10.50.0.223 sits entirely inside it. Two overlapping subnets would confuse routing.

What single route summarises 10.12.8.0/24 through 10.12.15.0/24?

10.12.8.0/21. Eight /24s starting at a third octet of 8 line up exactly on a /21 boundary, which covers 10.12.8.0 to 10.12.15.255.

Why can a /31 work on a point-to-point link?

RFC 3021 allows both addresses in a /31 to be used as the two ends of the link. A link with only two devices doesn’t need a network or broadcast address, so this saves two addresses per link compared with a /30.

What wildcard mask matches 10.4.8.0/21?

0.0.7.255. The /21 mask is 255.255.248.0, and taking each octet from 255 gives 0, 0, 7 and 255. Paired with 10.4.8.0, it covers 10.4.8.0 to 10.4.15.255.

Is subnet zero valid, or should the first subnet be skipped?

Use it. On today’s networks the first and last subnets are as good as any other. Some old courses told you to skip them and subtract two from your subnet count, a hangover from early classful routing. Only follow that if an old system or an exam question specifically asks you to.

← Networking calculators