Updated Networking

IP Subnet Calculator

Calculate IPv4 subnets from IP + CIDR or subnet mask, split networks into smaller subnets, size a subnet by required hosts, and check IPv6 prefix ranges.

IPv4 Subnet Subnet Splitter Hosts → CIDR IPv6 Prefix

IPv4 & IPv6 Subnetting, CIDR, Address Ranges, and Host Counts

Enter an IP and CIDR (or subnet mask) to get network, broadcast, usable range, wildcard, and host totals. Use the extra tabs to split networks or size a subnet from host requirements.

The network range is determined by applying the subnet mask to your IP. For /31 and /32, real-world usage can differ; the toggle helps match typical routing practices.
Splitting creates equal-sized subnets. If you need different sizes per segment, plan with VLSM: allocate the largest subnets first and work downward.
# Network Usable Range Broadcast
This tab finds the smallest IPv4 subnet size that can hold your required usable hosts, then shows the CIDR, subnet mask, total addresses, and the nearest “nice” boundaries if requested.
IPv6 uses prefixes rather than broadcast. This tab computes the network prefix and range boundaries for the chosen prefix length, and it highlights common IPv6 address types.

What an IP Subnet Calculator Helps You Do

An IP subnet calculator turns a confusing-looking address and prefix into a clear network story: where the subnet starts, where it ends, how many devices can fit, and what settings your router, firewall, or DHCP server should use. Subnetting is one of those topics that feels like “binary math” until you see it applied to real tasks, such as assigning VLANs, planning office networks, creating cloud security groups, or troubleshooting why a device cannot reach a gateway. Once you know the subnet boundaries and host capacity, the rest of the configuration becomes far more predictable.

This IP Subnet Calculator focuses on what you need most often: calculating IPv4 network address, broadcast address, usable host range, subnet mask and wildcard mask; splitting a network into smaller equal subnets; choosing the smallest subnet that can hold a target number of hosts; and checking IPv6 prefixes where broadcast does not exist and large address counts need a different way of thinking.

Subnetting in Plain Language

An IP address has two parts: a network part that identifies the subnet and a host part that identifies a device inside that subnet. The subnet mask or CIDR prefix tells you how many bits belong to the network. Everything after that is host space. A simple way to visualize it is: the prefix draws a line inside the address. Bits to the left of the line must match for two devices to be “on the same subnet.” Bits to the right can differ between hosts.

In IPv4, there are 32 bits total. A /24 prefix means the first 24 bits are the network, leaving 8 bits for hosts. Eight host bits means 2^8 total addresses, which is 256. In many everyday subnets, two of those addresses are reserved: the network address (all host bits zero) and the broadcast address (all host bits one). That leaves 254 usable host addresses, which is why /24 is often described as “about 254 hosts.”

In IPv6, there are 128 bits total, and prefixes like /64 are typical. The number of addresses in a /64 is enormous, which is why IPv6 subnet planning is usually about prefix boundaries and routing rather than squeezing every last address out of a range.

CIDR Notation vs Subnet Masks

CIDR notation (Classless Inter-Domain Routing) expresses the prefix length as a number after a slash. Examples include 10.0.0.0/8, 192.168.1.0/24, and 203.0.113.0/27. The number tells you how many bits are fixed for the network.

A subnet mask expresses the same idea in dotted-decimal form, such as 255.255.255.0. Each 255 corresponds to eight 1 bits. A 0 corresponds to eight 0 bits. In between, you may see masks like 255.255.255.224, where the last octet is partially filled with 1s. CIDR and subnet masks are two ways to represent the same boundary. Most modern networking tools use CIDR because it is compact and fits naturally into routing and firewall rules.

This calculator lets you input either CIDR or a subnet mask. If you know one, the tool can show you the other. That is useful when you are configuring devices that still require a dotted-decimal mask even if your documentation uses CIDR.

Network Address and Broadcast Address

In IPv4, the network address is the first address in the subnet. It represents the subnet itself rather than a specific host. The broadcast address is the last address in the subnet and is used to send traffic to all hosts on that subnet. Many networks and protocols treat these addresses specially, which is why they are commonly excluded from “usable host” counts.

The calculator returns:

  • Network address by setting all host bits to 0
  • Broadcast address by setting all host bits to 1
  • Usable host range as the first and last usable addresses in between (when applicable)

A key detail is that /31 and /32 behave differently. A /32 is a single host route: there is only one address, and it is typically used for routing to a specific device. A /31 has two addresses; many networks use /31 for point-to-point links because broadcast is not needed. That is why this tool includes a toggle to treat /31 as point-to-point (two usable hosts) or as a traditional subnet (zero usable hosts). Both interpretations exist in the real world depending on conventions and requirements.

Wildcard Masks and Why Firewalls Use Them

A wildcard mask is the inverse of a subnet mask. If the subnet mask has 1s where the network is fixed, the wildcard has 0s there, and it has 1s where variation is allowed. For example, a /24 subnet mask is 255.255.255.0, and the wildcard mask is 0.0.0.255. Some firewall and ACL systems use wildcard masks because they describe “which bits can change” rather than “which bits must match.”

If you are writing access rules such as “allow this entire subnet,” wildcard masks provide a direct way to express the match pattern. The IPv4 Subnet tab outputs the wildcard automatically so you can copy the value into devices that expect that format.

Host Counts: Total vs Usable

Subnet size and host count are where many subnetting mistakes begin. A subnet includes a total number of addresses, but the number of addresses you can assign to devices may be smaller. Traditional IPv4 host counts are:

  • Total addresses = 2^(32 − prefix)
  • Usable hosts = total − 2 (except special cases)

The tool shows both totals so you can plan realistically. For example, if you need 50 usable hosts, a /26 provides 64 total addresses and 62 usable hosts, which fits. A /27 provides 32 total addresses and 30 usable hosts, which does not fit.

A practical planning habit is to leave headroom. If you need 50 devices today, choosing the absolute smallest subnet might work, but you may regret it when you add phones, printers, access points, or IoT devices. The Hosts to CIDR tab returns the smallest matching subnet, but you can treat that as a baseline and then decide whether you want the next larger size for breathing room.

Block Size and “Where the Subnet Boundaries Fall”

A fast way to sanity-check an IPv4 subnet is to look at the block size in the “interesting” octet. The block size is how much the network increments when you move from one subnet to the next at the same prefix. For example, a /26 corresponds to 255.255.255.192. The last octet increments by 64 (0, 64, 128, 192). That means any /26 network in that /24 space starts at one of those boundaries.

This calculator shows the block size and the next subnet boundary, which is helpful when you are manually confirming that an IP belongs to the intended subnet. If your network should start at 192.168.10.128/26, and you see the next subnet at 192.168.10.192, you immediately know the boundaries are consistent.

Private Ranges, Special Ranges, and Common “Why Can’t I Reach It?” Issues

Not all IP ranges behave the same. Private IPv4 ranges are meant for internal networks and are not routed on the public internet. If you try to access the internet directly from a private address without NAT, it will not work the way public addressing does. That is why home routers translate private addresses to a public address when traffic leaves the home network.

In addition to private ranges, there are special ranges that frequently appear in troubleshooting:

  • 127.0.0.0/8 loopback (your own machine)
  • 169.254.0.0/16 link-local (often indicates DHCP failure)
  • 100.64.0.0/10 carrier-grade NAT space (often used by ISPs)
  • 224.0.0.0/4 multicast

The IPv4 Subnet tab flags whether an address is private or in a common special range. That doesn’t replace policy knowledge, but it helps you spot the obvious issues quickly.

Subnet Splitter: Turning One Network into Many

Splitting a network is a common planning task. You might start with a /24 and want four /26 networks for four VLANs. Or you may have a /20 in a data center and need to carve it into consistent /24 blocks for teams or environments. Equal splitting is mathematically clean: you add bits to the prefix. Each added bit doubles the number of subnets and halves the size of each subnet.

The Subnet Splitter tab accepts a base network in CIDR format and a number of desired subnets. It then:

  • Computes the new prefix required to create at least that many equal subnets
  • Calculates the new subnet mask and subnet size
  • Lists the first N subnet ranges so you can assign them to VLANs or routes

If the requested number of subnets is not a power of two, the new prefix is chosen to create enough subnets to cover the request, and you can treat the remaining subnets as spare capacity. In real designs, spare subnets are often a good thing, because they give you room to grow without renumbering.

Hosts to CIDR: Sizing the Smallest Subnet That Fits

When you design networks using VLSM, you often start with a requirement like “this segment needs 28 hosts,” “this segment needs 120 hosts,” and so on. The key is to choose the smallest subnet that can hold each requirement, then allocate the largest ones first so you don’t fragment the available space.

The Hosts to CIDR tab solves only the sizing step. It finds the smallest prefix where usable hosts meet or exceed your requirement, and it outputs the CIDR and subnet mask. This lets you quickly map host requirements into a list of candidate subnet sizes. From there, you can place those subnets into an overall address plan, starting with the largest segments and working downward.

Why “Nice” Boundaries Sometimes Matter

In documentation and team operations, it is often easier to standardize on boundaries that align with octets or nibbles. An octet boundary is /8, /16, or /24. A nibble boundary is any multiple of 4, such as /20, /28, or /64 in IPv6. These boundaries make reading and summarizing routes easier, and they reduce the chance of human error when someone is scanning address plans under pressure.

The Hosts to CIDR tab offers an optional preference for nibble or octet boundaries. This does not change the mathematics of host capacity; it simply suggests a “cleaner” alternative when the smallest theoretical subnet is slightly awkward for your organization. In many environments, operational clarity is worth a small amount of extra address space.

IPv6 Prefixes: Different Scale, Different Habits

IPv6 subnetting is conceptually similar to IPv4: you still have a network prefix and a host portion. The main difference is scale. With 128 bits, even “small” IPv6 subnets contain a huge number of addresses. That is why IPv6 design emphasizes consistent prefix boundaries, aggregation, and delegation rather than trying to conserve addresses the way IPv4 plans often do.

A common pattern is that a site receives a larger prefix (for example /48), and then assigns /64 subnets to VLANs or segments. A /64 is standard for many LANs because it supports common IPv6 mechanisms and provides an enormous host space. Instead of asking “how many hosts fit,” IPv6 planning usually asks “how should I structure prefixes so routing stays clean and growth is easy.”

The IPv6 Prefix tab calculates the network prefix for any IPv6 address and prefix length, shows the start and end of the range, and highlights common address types. It also supports compressed and expanded display so you can copy the format that matches your configuration needs.

Common Subnetting Pitfalls and How to Avoid Them

Many subnetting errors fall into a few repeat patterns:

  • Using sea-of-addresses thinking instead of boundaries: always identify the network and broadcast (IPv4) or the prefix (IPv6) first.
  • Confusing subnet mask and wildcard: they are opposites; using the wrong one in an ACL can open access too widely or block everything.
  • Forgetting reserved addresses (IPv4): if you plan 30 hosts in a /27, you have no room for growth and you’re exactly at the limit.
  • Mixing up CIDR and “classful” assumptions: modern routing is classless; /24 can exist anywhere, not only in 192.x ranges.
  • Documenting one thing and deploying another: keep the CIDR, mask, gateway, and DHCP range in one place so drift doesn’t happen.

A calculator is most valuable when it’s part of a consistent workflow: decide the subnet size, confirm boundaries, assign the gateway, define DHCP scope, then document it. When you do that repeatedly, subnetting stops being scary and becomes a repeatable habit.

Practical Examples You Can Apply Immediately

If you need four equal VLANs from a /24, you split /24 into /26 (adding 2 bits creates 4 subnets). Your subnets start at .0, .64, .128, and .192. Each has 64 total addresses and typically 62 usable. That design is common for small office segments that want separation without complex VLSM planning.

If you need roughly 100 hosts for a Wi-Fi network, /25 provides 128 total addresses and 126 usable. That gives headroom for growth and avoids the pain of renumbering when your guest network expands. If you need only 20 hosts for a management VLAN, /27 provides 32 total and 30 usable, which is often enough while still being tidy.

For point-to-point router links, /31 is often ideal because it uses only two addresses and avoids wasting a /30 block. The tradeoff is that not every legacy system treats /31 the same way, which is why this tool exposes the /31 option rather than assuming one rule fits every environment.

Limitations and What to Check in Your Environment

This IP Subnet Calculator is designed for planning and configuration support. It does not know your specific vendor platform behaviors, DHCP reservations, cloud provider quirks, or internal addressing policies. If your network reserves additional addresses (for example, cloud subnets that reserve a few addresses at the start of every range), account for that in your host planning even if the pure subnet math suggests more usable hosts.

When precision matters, confirm the platform rules and then use the calculator to validate the boundaries and counts. The goal is not just to get a number, but to prevent the kinds of subtle mistakes that cause outages: wrong gateway, overlapping subnets, or ACL patterns that match more than intended.

FAQ

IP Subnet Calculator – Frequently Asked Questions

Quick answers about CIDR, subnet masks, wildcard masks, usable host counts, subnet splitting, and IPv6 prefixes.

A subnet is a smaller network carved out of a larger IP address space. It is defined by a network address plus a prefix length (CIDR) or subnet mask that determines which bits identify the network and which bits identify hosts.

CIDR is the prefix length: the number of leading bits reserved for the network. In IPv4, /24 means 24 network bits and 8 host bits. In IPv6, /64 is a common subnet size with 64 network bits and 64 interface bits.

A subnet mask marks network bits as 1s and host bits as 0s (for example 255.255.255.0). A wildcard mask is the inverse: network bits are 0s and host bits are 1s (for example 0.0.0.255), often used in ACL rules.

In IPv4, the network address is the first address in the subnet (all host bits set to 0). The broadcast address is the last address (all host bits set to 1). They define the boundaries of the subnet.

For most IPv4 subnets, usable hosts equal total addresses minus 2 (excluding the network and broadcast addresses). For /31 point-to-point links, both addresses are usable in many networks. For /32, there is a single host address.

Traditional IPv4 rules reserve network and broadcast, but /31 is commonly used for point-to-point links where broadcast is not required, so both addresses can be assigned. A /32 represents a single host route with one address.

Private IPv4 ranges are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. Addresses in these ranges are used inside networks and typically reach the internet through NAT.

VLSM (Variable Length Subnet Mask) means using different subnet sizes within the same network plan. Instead of giving every segment the same /24, you choose smaller or larger subnets based on each segment’s host requirements.

Yes. If you add N bits to the prefix, you create 2^N equal subnets. The Subnet Splitter tab helps you choose a number of subnets and returns the new prefix and the resulting ranges.

Yes. The IPv6 tab calculates the network prefix from an IPv6 address and prefix length and shows the range boundaries and common address-type hints (like link-local, unique local, multicast).

Results are estimates for planning and configuration. Platform-specific rules (such as reserved addresses, routing policies, and /31 handling) may differ. Always verify against your network standards.