IP networks are divided into subnets, and every subnet decision comes down to a few numbers: the network address, the broadcast address, the usable host range, and the subnet mask. The Subnet Calculator works all of them out from an IPv4 address and a CIDR prefix, instantly and without manual binary arithmetic. You enter an address such as 192.168.1.10, choose a prefix such as /24, and the tool shows the full subnet breakdown, including binary forms of the address and mask.
Subnetting confuses many learners and working administrators because it mixes decimal addresses, binary masks, and prefix lengths that all describe the same division. This calculator removes the arithmetic so you can focus on the design question: how big should this subnet be, and which addresses can hosts actually use? This article explains each output in plain language, walks through the widget exactly as it works, and gives practical examples from home networks, office networks, and study for networking exams.
What Is the Subnet Calculator Tool?
The Subnet Calculator is a free online tool that takes an IPv4 address and a CIDR prefix length from /0 to /32 and computes the properties of the subnet that address belongs to. Its outputs are the network address, the broadcast address, the first and last usable host addresses, the total and usable address counts, the subnet mask, the wildcard mask, the CIDR notation for the network, and the binary representations of the IP address and the subnet mask. All calculation happens in your browser, with no network request and no data sent anywhere.
To understand the outputs, it helps to recall what a subnet is. An IPv4 address has 32 bits. The CIDR prefix says how many of those bits identify the network, and the remaining bits identify hosts within that network. In 192.168.1.10/24, the first 24 bits are the network part and the last 8 bits are the host part, giving 256 total addresses. The network address is the lowest address in the range, with all host bits zero. The broadcast address is the highest, with all host bits one. Usable host addresses are the ones in between, except in the special /31 and /32 cases described below.
The subnet mask is the same division written as an address: a /24 mask is 255.255.255.0, meaning the first 24 bits are ones. The wildcard mask is the inverse, used in access lists and some router configurations: for /24 it is 0.0.0.255. The binary display shows the address and mask as 32 bits in four groups of eight, which is how the division is easiest to see: the mask ones cover the network bits, and the zeros cover the host bits. Seeing the binary form alongside the decimal form is what makes the calculator a learning tool as well as a working tool.
How to Use the Subnet Calculator Tool
- Enter the IP address. In the “IP address” field, type a valid IPv4 address with four numbers from 0 to 255 separated by dots. The field starts with 192.168.1.10 as an example. If you enter an invalid address, the tool shows an error asking for a valid IPv4 address and does not calculate.
- Choose the CIDR prefix. Use the “CIDR prefix” dropdown to pick a value from /0 to /32. It starts at /24, the most common size for small networks. Smaller prefix numbers mean larger subnets with more addresses; larger numbers mean smaller subnets with fewer addresses.
- Press Calculate Subnet. The calculation runs immediately in your browser. There is no waiting for a server, because no network request is involved.
- Read the summary figures. Four headline values appear: Network Address, Broadcast Address, Usable Hosts, and Total Addresses. These answer the most common questions at a glance.
- Read the detail table. Below the summary, a table lists ten properties: IP address, network address, broadcast address, first usable host, last usable host, subnet mask, wildcard mask, CIDR notation, IP address in binary, and subnet mask in binary. Use the binary rows to check your understanding of how the mask splits the address.
Two edge cases have special handling that is worth knowing. For a /32 prefix, the subnet contains exactly one address, which is both the network address and the only usable host; this is used for host routes and loopback addresses. For a /31 prefix, the subnet contains two addresses and both are usable, following the point-to-point link convention: there is no separate network and broadcast address reserved, because a link with exactly two endpoints needs no broadcast. For every other prefix, the usable count is the total minus two, reserving the network and broadcast addresses. The tool applies these rules automatically.
Key Features of the Subnet Calculator Tool
- Full prefix range. Every prefix from /0, the whole IPv4 space, to /32, a single address, is available. You can explore tiny and huge subnets with the same tool.
- Complete output set. Network, broadcast, host range, counts, masks, CIDR notation, and binary forms are all shown in one result, so you do not need a second tool to fill gaps.
- Correct /31 and /32 handling. The special usable-host rules for the two smallest prefixes are built in, which many simple calculators get wrong by always subtracting two.
- Binary display. The address and mask are shown as dotted binary, making the network and host split visible bit by bit. This is invaluable for learners and for checking manual calculations.
- Instant, private calculation. Everything runs locally in your browser. No address you enter is sent to a server, stored, or logged, which matters when you are working with real network plans.
- Strict input validation. Each octet must be a number from 0 to 255, and exactly four octets are required. Invalid input produces a clear error instead of a wrong subnet.
Practical Use Cases
Designing a home or small office network
A common home network uses 192.168.1.0/24, giving 254 usable hosts from 192.168.1.1 to 192.168.1.254. That is far more than a household needs, but the size is harmless and the addressing is simple. A small office that wants to separate staff, guests, and printers into different subnets might split a larger range into several /25 or /26 subnets. The calculator shows each subnet range before any router is configured, so overlapping ranges and off-by-one errors are caught on paper rather than in a live network.
Planning VLANs and address space
Larger networks divide address space among departments, buildings, or VLANs. Starting from a block such as 10.0.0.0/16, an administrator might allocate /24 subnets to each VLAN: 10.0.1.0/24 for one floor, 10.0.2.0/24 for another, and so on. The calculator confirms the network and broadcast address of each allocation and the usable range for DHCP scopes and static assignments. Keeping a written plan with these ranges prevents two VLANs from accidentally sharing addresses.
Configuring routers, firewalls, and VPNs
Router interfaces, firewall rules, and VPN tunnels all need network addresses and masks in CIDR or dotted form. Entering the wrong mask is a classic error: a /24 typed as /16 exposes far more addresses than intended, and a /25 typed as /24 overlaps the neighboring subnet. Running the planned address and prefix through the calculator before entering them into a device confirms the network address, the mask, and the host range, and the wildcard mask output is directly usable in access-list configuration.
Studying for networking exams and courses
Subnetting is a core topic in networking study, and the binary display makes this calculator a study aid. A student can work out a subnet by hand, then check the network address, broadcast address, host count, and binary mask against the tool. Trying a range of prefixes on the same address, from /16 to /30, builds intuition for how the host count halves with each additional prefix bit. The /31 and /32 cases are worth studying separately, because their usable-host rules differ from the general rule.
Troubleshooting address conflicts and wrong masks
When two devices cannot communicate on the same local network, a wrong subnet mask on one device is a frequent cause: it believes the other device is on a remote network and sends traffic to the gateway instead. Calculating the subnet for each device address and mask shows whether they agree on the network address and range. If they disagree, the mask or the address on one device is wrong. This check takes seconds and often resolves problems that look like cable or hardware faults.
Tips and Best Practices
- Start from the number of hosts you need. Choose the smallest prefix that provides enough usable hosts, with room for growth. A subnet with 30 hosts fits a /27 with 30 usable addresses, but a /26 with 62 gives headroom for growth without wasting much space.
- Remember that usable is total minus two, except for /31 and /32. Forgetting the network and broadcast reservation is the most common subnetting error. This calculator applies the rule for you, but you should know it when reading other documentation.
- Keep a written address plan. Record each subnet network address, mask, range, and purpose in a document before configuring devices. A plan prevents overlaps and makes future expansion a matter of consulting the document rather than guessing.
- Use private ranges for internal networks. Internal subnets should use the private ranges 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16, not public addresses you do not own. Public addresses belong to their registered holders and must not be reused internally.
- Check the binary form when learning. If a result surprises you, look at the binary mask. The boundary between ones and zeros is the boundary between network and host, and seeing it usually explains the result immediately.
- Verify on the device after configuring. A calculator result is a plan, not proof. After entering addresses and masks on a router or host, verify with the device own display and test connectivity before considering the job done.
Limitations
This calculator handles IPv4 only. It does not calculate IPv6 subnets, which use 128-bit addresses and different conventions, including much larger standard prefix sizes and different rules for interface identifiers. It also does not design a subnetting scheme for you: it calculates one subnet from one address and prefix, and does not split a block into multiple subnets, check for overlaps between subnets, or suggest a prefix for a required host count. Those planning tasks need the administrator judgment, with this tool as the arithmetic check.
The calculator also cannot validate that an address belongs to a real network or that a chosen subnet is appropriate for a given purpose. Any valid IPv4 address and any prefix from /0 to /32 will produce a mathematically correct result, including combinations that make no sense in practice, such as a /0 on a private address. The results are arithmetic facts about the numbers entered, and the responsibility for choosing sensible addresses, avoiding overlaps, and following the organization address plan remains with the user.
Frequently Asked Questions
What does /24 mean?
It means the first 24 bits of the 32-bit address identify the network, leaving 8 bits for hosts. A /24 has 256 total addresses and 254 usable hosts. The subnet mask is 255.255.255.0. Each additional prefix bit halves the number of addresses, and each bit removed doubles it.
Why are two addresses unusable in most subnets?
The lowest address is the network address, which identifies the subnet itself, and the highest is the broadcast address, used to send to all hosts on the subnet. Neither can be assigned to a host. The /31 exception allows both addresses on point-to-point links, and a /32 is a single host address with no subnet range.
What is a wildcard mask?
It is the inverse of the subnet mask: zeros where the mask has ones, and ones where the mask has zeros. It is used in access control lists and some routing configurations to say which bits must match and which may vary. For a /24, the wildcard mask is 0.0.0.255.
Can this calculator handle IPv6?
No. It is IPv4 only. IPv6 subnetting uses 128-bit addresses and different standard practices, and it needs a dedicated IPv6 calculator. Do not try to enter an IPv6 address here; the validation will reject it.
How do I choose a prefix for a required number of hosts?
Find the smallest power of two that covers the hosts plus two reserved addresses, then convert to a prefix. For 50 hosts, you need 52 addresses, so 64 addresses, which is 6 host bits, giving a /26. This tool confirms the counts once you enter the prefix.
Why does the network address differ from the address I entered?
Because the entered address is a host address inside the subnet, and the network address is the lowest address of that subnet, found by clearing the host bits. For 192.168.1.10/24, the network address is 192.168.1.0. The entered address falls inside the usable range of that subnet.
Related Tools
These tools cover the addressing and connectivity questions that surround subnet design.
- What Is My IP Address – see your own public address.
- Website IP Finder – find the addresses behind a domain.
- MAC Address Generator – generate addresses for lab and virtual networks.
- DNS Lookup – check the records that resolve names to addresses.
- Ping Test Online – time requests to a host on your network plan.