Skip to content
snowkitDev

Subnets and masks, worked out for you

Type an address with its prefix, like 192.168.1.10/24, to get the network and broadcast addresses, the usable host range, the subnet and wildcard masks and the bits behind them.

Subnet calculator

Type an address with a prefix or a mask. Results update as you type.

Details

Binary view


                

How big a subnet do I need?

Split into subnets

SubnetFirst hostLast hostBroadcastHosts

Type an address with its prefix, like 192.168.1.10/24, to get the network and broadcast addresses, the usable host range, the subnet and wildcard masks and the bits behind them. Split a network into equal parts, or switch to IPv6 for prefix details. It is free and runs in your browser.

How to use the subnet calculator, step by step

  1. Choose IPv4 or IPv6.
  2. Type the Address and prefix, such as 192.168.1.10/24. You can also type an address and a mask, like 10.0.0.0 255.255.0.0.
  3. Read the Details: network, broadcast, first and last host, number of hosts, and the masks. Open the Binary view to see the bits.
  4. To plan a network, enter the Hosts needed to find the smallest subnet that fits, or enter a Number of subnets to split the network into equal parts.
  5. Press Copy all details to keep the result.

Reading the results

The prefix length says how many bits at the start of the address name the network; the rest number the hosts. A /24 leaves 8 host bits, so 256 addresses. The first one is the network address and the last is the broadcast address, which leaves 254 for devices. A /31 is used for point-to-point links and has 2 usable addresses, and a /32 is a single host.

Masks and wildcards

The subnet mask is the prefix written as an address, such as 255.255.255.0 for /24. The wildcard mask is its inverse, 0.0.0.255, which is what Cisco access lists and OSPF use. You can type either a prefix or a mask, like 10.0.0.0 255.255.0.0.

Private and special ranges

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are private and used inside homes and offices. 100.64.0.0/10 is shared space for carrier-grade NAT, 127.0.0.0/8 is loopback and 169.254.0.0/16 shows up when a device couldn't get an address. For IPv6, fd00::/8 is the private range, fe80::/10 is link-local, 2001:db8::/32 is reserved for examples, and a /64 is the normal size for one network.

Planning a network

  • Count the devices you need now and leave room to grow.
  • Pick the smallest prefix that holds them with room to spare.
  • Give each group, such as staff, guests and cameras, its own subnet.
  • Write down your plan, including the first and last host in each range.

Who uses it

Students studying for networking exams, IT staff setting up an office or a lab, home users tidying a router setup, and developers working with cloud networks. To look up a domain, see the DNS lookup, and for file permissions, the chmod calculator.

Questions

How many usable hosts does a /24 have?

254. Two of the 256 addresses are the network and broadcast addresses.

What is a wildcard mask?

The inverse of the subnet mask, used in some router access lists.

Is my data sent anywhere?

No. The sums run in your browser.

Where to next

Carry on with what you just made, still on your device.

More from Snowkit