Free CIDR calculator

Subnet Calculator

Enter an address with a prefix or mask to get the network, broadcast, usable host range and host count. Split it into smaller subnets in one click.

Result look wrong, or not sure what to change? A GoProIT technician can check it with you over a secure remote session. $59 per fix, Monday to Friday 8am to 8pm Eastern.

Book a technician(844) 734-1288

Common IPv4 subnet sizes

CIDRSubnet maskUsable hostsTypical use
/30255.255.255.2522Point-to-point links
/29255.255.255.2486Small block of static public IPs from an ISP
/28255.255.255.24014Servers or a small device network
/27255.255.255.22430Printers, cameras or a small VLAN
/26255.255.255.19262Guest Wi-Fi for a small office
/24255.255.255.0254The standard office or home network
/23255.255.254.0510Growing offices with many devices
/22255.255.252.01,022Larger sites or Wi-Fi with many guests
/16255.255.0.065,534Whole-company private address plans

How to read the results

  • Network address: the first address, which identifies the subnet itself. You can’t give it to a device.
  • Broadcast address: the last address, used to reach every device at once. Also not assignable.
  • Usable host range: everything in between. Your router usually takes the first or last one.
  • Wildcard mask: the inverse of the subnet mask, used in firewall and router access lists.

Planning subnets for a small office

Splitting one network into separate subnets (VLANs) keeps guests, cameras and smart devices away from your business computers. A simple plan for a 20-person office: 192.168.10.0/24 for staff computers, 192.168.20.0/24 for printers and phones, 192.168.30.0/24 for cameras, and 192.168.99.0/24 for guest Wi-Fi. Use the split option above to carve a bigger block into equal pieces.

How to subnet by hand: a worked example

The calculator does the maths instantly, but it helps to know how the numbers come out, especially when you’re checking a router config or studying for a network exam. Take 192.168.10.77/26.

  1. Find the block size. A /26 leaves 6 host bits (32 minus 26). Two to the power of 6 is 64, so every subnet holds 64 addresses.
  2. List the blocks in the last octet. They start at 0, 64, 128 and 192.
  3. Find the block your address falls in. 77 sits between 64 and 127, so the network address is 192.168.10.64.
  4. The broadcast is the last address in the block: 192.168.10.127.
  5. Usable hosts are everything in between: .65 to .126, which is 62 addresses.

The subnet mask follows from the same block size. 256 minus 64 is 192, so a /26 is 255.255.255.192. That shortcut works for any prefix between /24 and /30. For /16 to /23, do the same thing in the third octet instead.

Converting a subnet mask to CIDR

Count the 1 bits. Each 255 is 8 bits. For the last non-zero octet: 128 is 1 bit, 192 is 2, 224 is 3, 240 is 4, 248 is 5, 252 is 6, 254 is 7. So 255.255.255.240 is 8 + 8 + 8 + 4 = /28, and 255.255.252.0 is 8 + 8 + 6 = /22.

Choosing the right subnet size

Pick a size for the number of devices you’ll have in three years, not today. Phones, laptops, printers, access points and smart TVs add up fast, and many phones now show up with a new random address on each network, which eats into your DHCP pool.

Devices you expectPrefixUsable addresses
Up to 10 (servers, a few printers)/2814
Up to 25/2730
Up to 50/2662
Up to 120/25126
Up to 250/24254
Up to 500/23510

For most offices under 50 people, a /24 per network is the easy answer. Private address space is free, and a /24 is the size most routers and staff expect to see. Use smaller subnets when the addresses are scarce, such as a block of public IPs from your provider, or when you want a tight firewall rule for a handful of servers.

Reading a block of static IPs from your provider

Providers often sell a /29 and tell you something like “203.0.113.8/29, gateway .14”. Enter it in the calculator and you’ll see the network is .8, the broadcast is .15, and the usable range is .9 to .14. Their gateway takes one, so you get five addresses for your own equipment. People regularly lose a day trying to use .8 or .15 on a firewall interface.

The wildcard mask and the IP range

A wildcard mask is the subnet mask flipped: subtract each octet from 255. A /26 with mask 255.255.255.192 has the wildcard 0.0.0.63. Cisco access lists and OSPF network statements use wildcards, so you’ll see lines such as permit ip 192.168.10.64 0.0.0.63 any. Firewalls from most other vendors take CIDR or a plain start-to-end range instead.

When a form asks for an IP range from a subnet, such as a SaaS allow-list or a DHCP scope, use the calculator’s first and last usable addresses. For an allow-list, include the whole CIDR block if the form accepts it, since that is shorter and harder to get wrong.

IPv6 subnetting for small offices

IPv6 works differently. You don’t size an IPv6 network by host count, because every LAN gets a /64. That is the size SLAAC, the automatic address setup most devices use, expects. Even the smallest network has more addresses than you will ever use.

What you plan is how many /64 networks you can make from what your provider gives you:

  • /48: 65,536 subnets of /64
  • /56: 256 subnets of /64
  • /60: 16 subnets of /64
  • /64: just one network, so no room for VLANs

Each hex digit is 4 bits, so moving the prefix by 4 multiplies the subnet count by 16. If your provider only gives you a /64 and you want separate staff, guest and camera networks, ask for a /56. Many business providers will hand one out on request.

Where you’ll type these numbers, and the usual mistakes

To give a Windows 11 PC a fixed address, go to Settings > Network & internet > Ethernet, then next to IP assignment choose Edit, set it to Manual and turn on IPv4. Enter the IP address, subnet mask, gateway and DNS. On a Mac it’s System Settings > Network > Ethernet > Details > TCP/IP, with Configure IPv4 set to Manually. The what is my IP page shows how to read back the settings a device already has.

  • Wrong mask: a PC set to /24 on a /23 network can reach half the devices and not the other half. The symptom is a printer that only some people can print to.
  • Gateway outside the subnet: Windows will warn you, but devices like cameras and printers often accept it and then never reach the internet.
  • Static address inside the DHCP pool: sooner or later the router hands the same address to a laptop, and both devices drop off. Keep fixed addresses outside the pool or use a DHCP reservation, which needs the device’s MAC address. The MAC address lookup helps you match addresses to devices.
  • Overlapping VPN ranges: if the office uses 192.168.1.0/24 and so does an employee’s home router, the VPN connects but nothing loads. Moving the office to something like 10.20.0.0/24 avoids it.

If you’d like someone to plan and set up the VLANs on your router for you, a technician can do it over a remote session for $59.

Frequently asked questions

What is CIDR notation?

CIDR writes the subnet mask as a number of bits after a slash. /24 means the first 24 bits are the network, which is the same as the mask 255.255.255.0 and gives 256 addresses.

Why does a /24 have 254 usable hosts and not 256?

The first address is the network address and the last is the broadcast address. Neither can be given to a device, so 256 minus 2 leaves 254.

What are /31 and /32 used for?

A /32 is a single address, used for loopbacks and firewall rules. A /31 has two addresses with no broadcast and is used on point-to-point links between routers.

Which private IP ranges can I use?

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918). Avoid 192.168.0.0/24 and 192.168.1.0/24 for an office that uses VPNs, since many home routers use them and the ranges will clash.

How many /27 subnets fit in a /24?

Eight. Each bit you add to the prefix halves the subnet size, so a /24 splits into two /25s, four /26s, eight /27s or sixteen /28s. The split option above lists every one with its range.

Can I join two /24 networks into one /23?

Yes, if they line up. A /23 must start on an even number in the third octet, so 192.168.10.0/23 covers 192.168.10.0 to 192.168.11.255. You can’t make a /23 from 192.168.11.0 and 192.168.12.0. Every device on the network then needs the new mask, 255.255.254.0.

What’s the difference between a subnet mask and a wildcard mask?

They describe the same network from opposite sides. In a subnet mask the 1 bits mark the network part, in a wildcard mask the 1 bits mark the part that can vary. So 255.255.255.0 and 0.0.0.255 both describe a /24.

Which address should the router use?

Convention is the first usable address, such as .1, though some networks use the last one, such as .254. Either works. What matters is picking one and keeping it the same across every site so staff and support know where to look.

How many IP addresses are in a CIDR block?

Two to the power of (32 minus the prefix) for IPv4. A /20 has 4,096 addresses, of which 4,094 are usable. For IPv6 the formula is the same with 128 instead of 32, which is why a single /64 holds about 18 quintillion addresses.

Related guides

Planning VLANs or a new office network?We design and set up secure, segmented networks for small businesses.
Get help from a technician

More free tools

See all 30 free IT tools

Free tools find it. We fix it.

Want a technician to sort it out for you?

One-time remote fix for $59, or unlimited help for your whole team at $49 per user per month. No contract and no setup fee.

WhatsApp us(202) 960-2022 · messages