Advanced Subnet Mask Calculator

Explore subnet masks, wildcard values, address ranges, and hosts. Compare CIDR options for smarter planning. Build reliable IPv4 networks with fast, precise visual insights.

Subnet mask calculator form

Enter any IPv4 address inside the target subnet.
Choose whether you want to enter /24 or 255.255.255.0.
Valid range is 0 to 32.
Mask must be contiguous, not mixed.
Great for quick planning of child networks.
Reset Form

Example data table

Input IP CIDR Subnet Mask Network Broadcast Usable Hosts
192.168.10.34 /24 255.255.255.0 192.168.10.0 192.168.10.255 254
10.0.5.130 /26 255.255.255.192 10.0.5.128 10.0.5.191 62
172.16.8.14 /27 255.255.255.224 172.16.8.0 172.16.8.31 30
203.0.113.9 /30 255.255.255.252 203.0.113.8 203.0.113.11 2

Formula used

1. Prefix to mask: The first n bits are 1, and the remaining bits are 0. Example: /24 = 255.255.255.0.

2. Network address: Network = IP AND Subnet Mask.

3. Wildcard mask: Wildcard = 255.255.255.255 - Subnet Mask.

4. Broadcast address: Broadcast = Network OR Wildcard.

5. Total addresses: 2^(32 - Prefix).

6. Usable hosts: Normally Total - 2, except /31 and /32.

7. Split planning: Borrowed Bits = ceil(log2(Requested Subnets)), then New Prefix = Current Prefix + Borrowed Bits.

How to use this calculator

  1. Enter an IPv4 address from the subnet you want to inspect.
  2. Select whether you want to provide a CIDR prefix or a dotted subnet mask.
  3. Enter the prefix like /24 as 24, or enter a mask like 255.255.255.0.
  4. Optionally add a subnet split count to estimate smaller child networks.
  5. Click the calculate button to view the network, broadcast, host range, binary view, and graph.
  6. Use the CSV button for spreadsheet exports and the PDF button for a printable report.

Frequently asked questions

1. What does a subnet mask do?

A subnet mask marks which IPv4 bits belong to the network and which belong to hosts. It helps identify the network address, broadcast address, and valid host range for that subnet.

2. What is the difference between CIDR and a subnet mask?

CIDR writes the same mask as a prefix length, such as /24. The dotted mask 255.255.255.0 and the prefix /24 describe the same network boundary.

3. Why are two addresses often unavailable for hosts?

Most IPv4 subnets reserve one address for the network and one for broadcast. That is why usable hosts usually equal total addresses minus two. The /31 and /32 cases are special.

4. What is a wildcard mask?

A wildcard mask is the inverse of the subnet mask. Routers, access control lists, and some firewall rules use it to match IP ranges quickly and precisely.

5. Why can the entered IP become a different network address?

The entered IP can be any host inside a subnet. The calculator applies a bitwise AND with the mask to find the real network boundary for that address.

6. Can this tool help plan smaller child subnets?

Yes. Enter how many child subnets you want, and the tool estimates borrowed bits, the new prefix, addresses per subnet, and preview ranges for the first subnet groups.

7. Do private and public addresses change the math?

No. Private and public labels do not change subnet calculations. They simply describe how the address space is intended to be routed and used.

8. Does this calculator support IPv6?

This version focuses on IPv4 subnetting. IPv6 also uses prefix lengths, but its addressing rules, notation, and host behavior differ significantly from IPv4.

Related Calculators

ip network calculatorsubnet calculatorip address plannerwildcard mask calculatoripv4 subnet calculatorip range calculatorip block calculatornetwork address calculatoripv6 subnet calculatorcidr block calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.