Free networking calculator

Subnet Calculator

Calculate IPv4 CIDR ranges, subnet masks, wildcard masks, network and broadcast addresses, usable hosts, and the smallest subnet size for a host count.

  • IPv4 CIDR
  • Subnet mask
  • Wildcard mask
  • Usable hosts

CIDR inputs

Enter an IPv4 address and prefix

This calculator covers IPv4 subnet math. It treats /31 and /32 as valid special-purpose ranges, while the host planner below recommends traditional LAN-sized blocks.

Subnet result

CIDR breakdown

Calculated block192.168.1.25/24
Network address
192.168.1.0
Broadcast address
192.168.1.255
First usable host
192.168.1.1
Last usable host
192.168.1.254
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Total addresses
256
Usable hosts
254
Network CIDR
192.168.1.0/24
Binary mask
11111111.11111111.11111111.00000000
Usable range
192.168.1.1 - 192.168.1.254
Address type
Private RFC1918 address range

Subnet sizing

Find a subnet size from host count

Enter the number of usable devices you need and the planner recommends the smallest traditional IPv4 subnet block that can hold them.

Recommended prefix
Subnet mask
Block size
Usable hosts

The host planner avoids /31 and /32 recommendations because most LAN planning still reserves network and broadcast addresses.

How subnet calculation works

IPv4 addresses are 32-bit numbers usually written as four decimal octets. CIDR notation, such as 192.168.1.25/24, says how many of those bits belong to the network portion. The remaining bits are available for host addresses inside that block.

The subnet mask is the dotted-decimal version of the network bits. A /24 prefix becomes 255.255.255.0 because the first 24 bits are set to 1 and the last 8 bits are host bits.

Network address, broadcast address, and usable hosts

The network address is the first address in the block. The broadcast address is the last address in most IPv4 subnets. Traditional LAN subnets reserve both, so a /24 has 256 total addresses and 254 usual host addresses.

A /31 is a special case commonly used for point-to-point links, and a /32 identifies a single host route. This calculator shows those ranges as valid, but the host planner recommends traditional blocks for ordinary device networks.

Prefix Usable hosts Typical planning fit
/30 2 Small point-to-point links when /31 is not appropriate.
/29 6 Tiny lab, management, or provider handoff networks.
/28 14 Small device groups with a little room for growth.
/24 254 Common small-office, home lab, or VLAN-sized network.
/23 510 Larger access networks where a /24 would fill too quickly.

Wildcard masks

A wildcard mask is the inverse of the subnet mask. Network teams often see wildcard masks in access control lists and routing configurations. For example, 255.255.255.0 has a wildcard mask of 0.0.0.255.

If the subnet mask bits say which bits must match, the wildcard bits say which bits can vary. That makes wildcard masks useful when a rule needs to match a whole subnet instead of one host.

Common subnetting mistakes

Common mistakes include forgetting to subtract network and broadcast addresses, confusing /24 with 24 usable hosts, or typing an address from inside a subnet and assuming it is the network address. The network address is calculated from the address and prefix together.

When planning a real network, leave room for gateways, printers, virtual machines, DHCP reservations, monitoring systems, and future growth. A subnet that fits exactly on paper can become frustrating once devices are added.

Also confirm whether your platform treats addresses differently for cloud subnets, point-to-point links, or provider-assigned public ranges. Cloud vendors and network appliances may reserve additional addresses beyond the traditional network and broadcast addresses.

Methodology, Formula & Official Standards

This IPv4 CIDR Subnet Mask, Usable Host Range & Broadcast tool implements the official specifications and mathematical definitions established by IETF RFC 4632 (Classless Inter-Domain Routing — CIDR), RFC 1918 (Private Address Space), and RFC 3021 (/31 Point-to-Point Links). Core calculation logic: Host Bits h = 32 - Prefix_Length; Total Addresses = 2^h; Usable Hosts = max(0, 2^h - 2) for /1 to /30; Network Address = IP BITWISE-AND Mask; Broadcast Address = Network BITWISE-OR (~Mask). All conversions and calendar evaluations run locally in your browser using deterministic standards so engineers, travelers, and students can verify exact outputs without rounding drift.

Step-by-Step Worked Example

Worked Example: Given 192.168.10.140/26, the /26 prefix uses 26 network bits and h = 32 - 26 = 6 host bits, yielding a subnet mask of 255.255.255.192 (block size 2^6 = 64). The containing 64-address block starts at network address 192.168.10.128, ends at broadcast address 192.168.10.191, and provides 62 usable host IPs (192.168.10.129 – 192.168.10.190).

Reference Benchmark & Comparison Table: IPv4 CIDR Subnet Mask, Usable Host Range & Broadcast Reference Benchmark & Comparison Table

Standard Tier / ModePrimary Definition / InputConverted / Secondary ValueKey Technical MetricPractical Engineering / Planning Rule
/24 (Classic C Block)255.255.255.0256 Total254 Usable HostsStandard VLAN / office floor subnet
/26 (Quarter C Block)255.255.255.19264 Total62 Usable HostsDepartmental segment / small cloud subnet
/28 (16-Address Block)255.255.255.24016 Total14 Usable HostsDMZ cluster / load balancer VIP pool
/30 (Point-to-Point WAN)255.255.255.2524 Total2 Usable HostsTraditional router-to-router serial/BGP link
/20 (16 Contiguous /24s)255.255.240.04,096 Total4,094 Usable HostsAWS/GCP availability-zone VPC subnet

Frequently Asked Questions

What official standard governs this IPv4 CIDR Subnet Mask, Usable Host Range & Broadcast calculator?

This tool follows IETF RFC 4632 (Classless Inter-Domain Routing — CIDR), RFC 1918 (Private Address Space), and RFC 3021 (/31 Point-to-Point Links), applying the exact formula Host Bits h = 32 - Prefix_Length; Total Addresses = 2^h; Usable Hosts = max(0, 2^h - 2) for /1 to /30; Network Address = IP BITWISE-AND Mask; Broadcast Address = Network BITWISE-OR (~Mask) directly in client-side JavaScript.

Why do exact conversion constants and boundary rules matter?

Using truncated constants or ignoring leap-year, DST, or binary-vs-decimal rules introduces cumulative errors in storage sizing, network routing, and international scheduling.

Does this tool send any entered data, tokens, or dates to an external server?

No. Every conversion and inspection runs 100% locally inside your browser tab with zero server-side processing or logging.

How can I verify my result against the benchmark table?

Match your input range to the closest row in the 5-tier reference table above and compare against the Worked Example step-by-step walkthrough.

Editorial Methodology & Disclaimer

Editorial Methodology & Disclaimer: All calculator outputs and reference tables on Utility Stack are educational planning estimates based on published mathematical standards. They are not professional financial, legal, tax, or medical advice.