Subnet Calculator

Subnet Calculator

Enter an IP address and a prefix length and this calculator works out the network it belongs to: the subnet mask and wildcard mask, the network and broadcast addresses, the usable host range, how many addresses the block holds and how many are usable, and whether the address is private or public. IPv4 and IPv6 are both handled, including the special /31 and /32 cases. You can also split a network into equal subnets and see each resulting subnet in a table.

Your network

You can include the prefix in the address, like 192.168.1.10/26, or enter it in the next field.
The network is divided into that many equal subnets, and each one is listed with its host range and broadcast address.

Disclaimer: This calculator gives estimates for general information only. It is not financial, medical or other professional advice. Check production network changes against your own documentation and change process before applying them.

What this calculator does

It takes any IP address and prefix length and derives the complete description of the subnet that address lives in. For IPv4 that means the dotted netmask and its inverse, the wildcard mask used in access lists, the network address the block starts at, the broadcast address it ends at, the usable range between them, and the address counts stated two ways (total addresses in the block, and usable hosts after the network and broadcast addresses are set aside), with the recognised exceptions for /31 point-to-point links and /32 host routes handled as the standards define them. It also reports whether an address is private or public, and its class. For IPv6 it gives the network address in compressed form, the first and last addresses of the range, and the address count, which at common prefix lengths runs into numbers too large for ordinary notation and is shown in full. The optional splitter divides an IPv4 network into the number of equal subnets you ask for and tabulates each one, which is the arithmetic subnetting questions and network designs actually start from.

How to use it

  • The prefix is the whole game. Every result flows from the prefix length: /24 and /26 on the same address are different networks with different ranges. If a result surprises you, the prefix was not what you assumed, and entering the address with its prefix attached (192.168.1.10/26) removes the ambiguity between the two fields.
  • Total addresses and usable hosts are different numbers. A /26 holds 64 addresses and 62 usable hosts, because the first address names the network and the last is its broadcast. Quoting 64 as the host count is the most common subnetting error in practice, and the results here keep the two figures side by side so neither can impersonate the other. The exceptions matter too: a /31 has 2 usable addresses, not 0, on point-to-point links, and a /32 is a single usable host.
  • Use the wildcard mask for ACLs and OSPF. The wildcard is the bitwise inverse of the netmask (0.0.0.63 against 255.255.255.192 on a /26) and it is what Cisco-style access lists and OSPF network statements actually ask for. It is printed here so it never has to be derived by hand under time pressure.
  • Splitting borrows bits, and bits come in powers of two. Dividing a network into 4 costs 2 host bits and moves the prefix by 2 (/24 becomes /26); into 8 costs 3. Asking for 6 subnets is asking for something binary cannot do evenly, so the splitter accepts powers of two and tells you the nearest options when it cannot, rather than silently rounding your design.
  • IPv6 subnets are not scarce. A /64, the standard LAN size, contains 18,446,744,073,709,551,616 addresses, and IPv6 has no broadcast address at all. The IPv6 results therefore show the range’s first and last addresses instead, and the counts are given in full because approximations hide the one fact that matters: you will not run out.

How it is calculated

  • Block size = 2^(32 – prefix) for IPv4 and 2^(128 – prefix) for IPv6. Network address = the address rounded down to a multiple of the block size. Broadcast (IPv4) = network + block size – 1. Netmask = the address whose first (prefix) bits are 1; wildcard = its inverse.
  • Usable hosts (IPv4): block size – 2 for prefixes up to /30; 2 for /31 (both addresses usable on point-to-point links, per RFC 3021); 1 for /32. Usable range follows the same conventions. All computations are exact integer arithmetic; IPv6 counts use arbitrary-precision integers, so the full figure is real, not rounded.
  • Splitting: asking for N subnets (a power of two) adds log2(N) to the prefix and steps through the original block in increments of the new block size, listing each subnet’s network address, usable range and broadcast.

Worked examples

192.168.1.10/26. The /26 block size is 64, so networks fall at .0, .64, .128 and .192, and this address lives in the first. Netmask 255.255.255.192, wildcard 0.0.0.63, network 192.168.1.0, broadcast 192.168.1.63, usable hosts 192.168.1.1 to 192.168.1.62: 64 addresses, 62 usable. The address is private (192.168.0.0/16) and class C. Every one of those figures appears in the results from the two inputs.

Splitting 10.0.0.0/24 into 4. Four subnets borrow 2 bits, giving /26 blocks of 64: 10.0.0.0/26 (hosts .1 to .62, broadcast .63), 10.0.0.64/26 (.65 to .126, .127), 10.0.0.128/26 (.129 to .190, .191) and 10.0.0.192/26 (.193 to .254, .255). The splitter prints the full table, which is the design document for a four-way segmented network in one step.

2001:db8:abcd:1234::1/64 (IPv6). The network is 2001:db8:abcd:1234:: and the range runs to 2001:db8:abcd:1234:ffff:ffff:ffff:ffff, containing 2^64 addresses: 18,446,744,073,709,551,616. The address sits in the documentation range (2001:db8::/32), which the results name, a detail worth noticing because documentation addresses appear in countless examples and should never be configured on a real network.

Reading your results

Read the network address first: it is the identity of the subnet, and two devices communicate locally only when they compute the same network from their own address and mask. A mismatch there, one device at /24 and another at /26 on the same wire, produces the classic fault where some addresses answer and their neighbours do not. Read the usable range when allocating addresses, keeping infrastructure at the edges by convention, and keep the broadcast address out of every assignment: it is the one address in the block that must never belong to a host. On IPv6, read the type line (global, link-local, unique local, loopback, documentation) before anything else, because it tells you whether the address can route anywhere at all.

Limitations

  • The splitter makes equal subnets. Real designs often need variable-length subnetting (VLSM), a /26 here and a /28 there from the same block. Equal splitting is the correct first step and the common exam case; a VLSM design is built by applying this calculator block by block, largest first, which the per-network results fully support.
  • Classful information is historical. The IPv4 class is reported because configurations and old documentation still reference it, but modern routing is classless: the prefix you enter, not the class, decides everything the calculator computes.
  • Private and public is about the address, not your NAT. A private address here means the RFC 1918 ranges (and their IPv6 counterparts); whether a given private host can reach the internet depends on your NAT and firewall, which no address arithmetic can see.
  • Reservations inside the range are your network’s business. DHCP pools, gateway conventions and statically assigned infrastructure all live inside the usable range the calculator reports; it shows the whole range because reservations differ by network and belong in your documentation.

Frequently asked questions

What does /26 mean?

It means the first 26 bits of the address identify the network and the remaining 6 identify the host: CIDR notation, written as a slash and a count. A /26 IPv4 block therefore holds 2^6, which is 64 addresses, with the netmask 255.255.255.192 (26 ones followed by 6 zeros in binary). Larger prefix, smaller block: /24 holds 256 addresses, /30 holds 4. Every figure on this page is derived from that single number together with the address, and entering the address as 192.168.1.10/26 supplies both at once.

How many usable hosts are in a /24?

254. The block holds 256 addresses; the first is the network address and the last is the broadcast address, leaving 254 for hosts. The same subtraction applies at every size down to /30 (2 usable of 4), and then the conventions change: /31 gives 2 usable on point-to-point links where broadcast is not needed, per RFC 3021, and /32 is exactly 1, a host route. This calculator applies those conventions and labels them in the results, because a tool that reports 0 usable hosts for a /31 is describing a network that real routers use every day.

What is a wildcard mask used for?

It is the netmask inverted, and it is the form several important configurations demand: Cisco access control lists match addresses against a wildcard, and OSPF network statements use it to select interfaces. On a /26 the netmask is 255.255.255.192 and the wildcard is 0.0.0.63, where the 1 bits mark the positions the configuration should ignore. Deriving it by hand is a classic source of faults during changes, which is why it is a first-class result here rather than an exercise left to the reader.

Why does IPv6 show no broadcast address?

Because IPv6 abolished broadcast. Where IPv4 shouts to every host on the subnet, IPv6 uses multicast groups that interested hosts join, which is more efficient and changes what the end of a range means: the last address in an IPv6 subnet is an ordinary address. The calculator therefore reports the first and last addresses of the range for IPv6 and reserves the broadcast line for IPv4, and the address count for a /64 (over eighteen quintillion) explains why IPv6 addressing plans are drawn around structure, not scarcity.

Related calculators

Method: exact integer subnet arithmetic from the address and prefix, IPv4 conventions for /31 and /32 per RFC 3021, IPv6 ranges by arbitrary-precision computation, exactly as defined on this page. Last reviewed: 13 October 2026.