← Enterprise IT Network Studio
🌐

IP Subnet Calculator

CIDR · Network / Broadcast · Usable Hosts · Wildcard Mask

When to use: Use to calculate subnet details from any IPv4 CIDR notation. Returns network address, broadcast address, subnet mask, wildcard mask, first/last usable host, and total usable hosts. Essential for VLAN design, IP address planning (IPAM), firewall ACL configuration, and network documentation. Use the quick-select presets for common enterprise subnets.

Input
/
Quick Presets
Usable Hosts
254
192.168.1.0/24
Subnet Details
Network Address192.168.1.0
Subnet Mask255.255.255.0
Wildcard Mask0.0.0.255
Broadcast Address192.168.1.255
First Usable Host192.168.1.1
Last Usable Host192.168.1.254
Usable Hosts254
Total Addresses256

About the Subnet Calculator

This free IPv4 subnet calculator turns an IP address and a CIDR prefix (or subnet mask) into the full picture of a subnet: the network address, broadcast address, subnet mask, wildcard (inverse) mask, the first and last usable host, and the total count of usable hosts. Enter something like 192.168.1.0/26 and it does the binary math for you. It's built for network engineers, system administrators, students studying for CCNA, and anyone planning VLANs, firewall ACLs, or IP address management (IPAM).

How subnetting works

An IPv4 address is 32 bits, written as four octets (e.g. 192.168.1.0). The CIDR prefix length — the /n after the address — tells you how many of those leading bits identify the network. The remaining bits identify hosts. A /26, for example, uses 26 network bits and leaves 6 host bits.

The subnet mask is just those network bits set to 1 and the host bits set to 0. A /26 mask is 255.255.255.192, because the last octet's top two bits (128 + 64 = 192) are part of the network. The wildcard mask is the inverse — 0.0.0.63 for a /26 — and is used in ACLs and routing.

Key formulas: • Total addresses in the subnet = 2^(host bits) • Usable hosts = 2^(host bits) − 2, because the network address and the broadcast address are reserved and cannot be assigned to a device. • Network address = IP AND subnet mask (host bits forced to 0). • Broadcast address = network OR wildcard mask (host bits forced to 1).

Worked example — 192.168.1.0/26: • 6 host bits → 2^6 = 64 total addresses, 64 − 2 = 62 usable hosts. • Subnet mask = 255.255.255.192, wildcard = 0.0.0.63. • Network address = 192.168.1.0, broadcast = 192.168.1.63. • Usable host range = 192.168.1.1 through 192.168.1.62. The next subnet would start at 192.168.1.64/26.

How to use it

1. Enter the IPv4 address (any address inside the subnet works — the calculator finds the network address for you). 2. Set the CIDR prefix length (0–32), or pick one of the quick presets for common enterprise sizes like /24 or /30. 3. Read the results: network address, broadcast address, subnet mask, wildcard mask, first and last usable host, and the total usable host count. 4. Use the network/broadcast values for documentation and the host range when assigning static IPs or DHCP scopes.

VLSM and subnet planning

Variable-Length Subnet Masking (VLSM) means using different prefix lengths within the same address space so each subnet is sized to what it actually needs, instead of giving every subnet the same wasteful /24. A point-to-point router link only needs 2 usable hosts, so a /30 (2 usable) or /31 (RFC 3021, 2 usable on point-to-point links) is ideal, while a user VLAN with 200 devices needs a /24 (254 usable).

Plan from largest to smallest: allocate the biggest subnet first, then carve the next blocks out of the remaining space, doubling the prefix as the host requirement halves. This keeps subnets contiguous, prevents overlap, and leaves room for route summarization. Right-sizing with VLSM is the difference between exhausting a /16 and having addresses to spare.

Frequently asked questions

How do you calculate the number of hosts in a subnet?

Count the host bits (32 minus the CIDR prefix length), then usable hosts = 2^(host bits) − 2. The subtraction removes the network address and the broadcast address, which are reserved. Example: a /26 has 6 host bits, so 2^6 − 2 = 62 usable hosts.

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation writes an IP address followed by a slash and the prefix length, e.g. 192.168.1.0/24. The number after the slash is how many leading bits identify the network; the rest identify hosts. It replaced the old rigid Class A/B/C system and allows subnets of any size.

How do you find the network and broadcast address?

The network address is the IP bitwise-ANDed with the subnet mask (all host bits set to 0). The broadcast address is the IP bitwise-ORed with the wildcard mask (all host bits set to 1). For 192.168.1.0/26 the network is 192.168.1.0 and the broadcast is 192.168.1.63.

What is a subnet mask?

A subnet mask is a 32-bit value that marks which bits of an IP address belong to the network (1s) versus the host (0s). It corresponds directly to the CIDR prefix: /24 = 255.255.255.0, /26 = 255.255.255.192, /30 = 255.255.255.252.

What is VLSM?

VLSM (Variable-Length Subnet Masking) is the practice of using different subnet mask lengths within one network so each subnet is sized to its actual host count — for example a /30 for a router-to-router link and a /24 for a user VLAN. It conserves address space and supports route summarization.

🎓

Try our Enterprise IT Networks Studio

More calculators, simulators, and guides for this discipline.

Related tools & guides

VLAN PlanningPoE Budget CalculatorCable Run PlannerGuide: Enterprise Network Design