IP Subnet Calculator

Use this IP subnet calculator to break down IPv4 CIDR blocks and IPv6 prefixes into practical network details. Instantly see the network address, subnet mask, wildcard mask, usable host range, broadcast address, total addresses, and other planning details that help with VLAN design, firewall rules, static assignments, and lab work.

IP Subnet Calculator

Result
192.168.1.0/24
IPv4 subnet
IP address
192.168.1.42
CIDR
/24
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Network address
192.168.1.0
Broadcast address
192.168.1.255
Usable host range
192.168.1.1 – 192.168.1.254
Total addresses
256
Usable hosts
254
Binary mask
11111111.11111111.11111111.00000000
Class hint
C

What Is an IP Subnet Calculator?

An IP subnet calculator takes an IP address and CIDR prefix (e.g., 192.168.1.0/24) and computes all derived network parameters: subnet mask, wildcard mask, network address, broadcast address, first/last usable host addresses, and total host count. Subnetting is the practice of dividing a larger network into smaller logical segments to improve performance, security, and address management.

Network engineers use subnet calculators for designing LANs, configuring firewall rules, writing routing table entries, and planning cloud VPC (Virtual Private Cloud) architectures. CIDR (Classless Inter-Domain Routing) replaced the old Class A/B/C system in 1993 and is the universal standard for IPv4 and IPv6 addressing today.

How to Use This Subnet Calculator

  1. Enter an IPv4 address in dotted-decimal notation (e.g., 192.168.10.0).
  2. Enter the CIDR prefix length (0–32) or subnet mask (e.g., 255.255.255.0).
  3. The calculator instantly shows: subnet mask, wildcard mask, network address, broadcast address, usable host range, and host count.
  4. For subnetting tasks, check how many /24s fit into a /16, or how many hosts a /28 provides (14 usable).
  5. Use the “subnet breakdown” view to see all subnets within a larger CIDR block.

Worked Example: 192.168.1.0/24 Breakdown

Network: 192.168.1.0/24

Subnet Mask: 255.255.255.0

Wildcard Mask: 0.0.0.255

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

Usable Hosts: 254 (2&sup8; − 2)

The −2 accounts for the network address (192.168.1.0) and broadcast address (192.168.1.255), which cannot be assigned to hosts.

Common CIDR Subnet Reference

CIDRSubnet MaskTotal IPsUsable HostsCommon Use
/32255.255.255.25510 (host route)Single host or loopback route
/30255.255.255.25242Point-to-point WAN/router links
/29255.255.255.24886Small DMZ segments
/28255.255.255.2401614Small office subnets
/27255.255.255.2243230Medium segments
/24255.255.255.0256254Standard home/office LAN
/23255.255.254.0512510Medium campus network
/16255.255.0.065,53665,534Large enterprise / cloud VPC
/8255.0.0.016.7M16.7MISP / Class A blocks

Key Concepts: CIDR, Subnetting, and Private Ranges

CIDR notation (e.g., /24) specifies how many bits of the IP address are the network portion. The remaining bits identify hosts within that network. /24 means 24 network bits and 8 host bits, giving 2&sup8; = 256 total addresses (254 usable). Each decrease in prefix length doubles the network size: /23 has 510 usable hosts, /22 has 1022, etc.

Private IP ranges (RFC 1918) are reserved for internal networks and are not routable on the public internet: 10.0.0.0/8 (Class A, ~16.7M addresses), 172.16.0.0/12 (Class B, ~1M addresses), and 192.168.0.0/16 (Class C, 65,534 addresses). Home routers use 192.168.x.x; corporate networks often use 10.x.x.x. NAT (Network Address Translation) maps these private addresses to a single public IP.

Subnetting vs. supernetting. Subnetting divides a network into smaller blocks (e.g., splitting /24 into four /26s). Supernetting (route aggregation/summarization) combines multiple smaller networks into a single routing entry, reducing routing table size. Both use the same binary math — the key is identifying the network boundary by ANDing the IP address with the subnet mask.

Tips for Network Subnetting

Always plan for growth. If you need 50 hosts, a /26 (62 usable) is the minimum, but consider using a /25 (126 usable) to accommodate future expansion. Re-subnetting a live network is disruptive; over-allocating address space is cheap in private RFC 1918 ranges where addresses are essentially unlimited.

Use /30 for point-to-point links. Router-to-router WAN links need only 2 host addresses — a /30 gives exactly that with minimal waste. Using a /24 for a 2-host link wastes 252 addresses and makes routing tables less readable. In cloud environments (AWS, Azure, GCP), each subnet wastes a few additional addresses for cloud infrastructure, so add 3–5 to your minimum count.

Document your subnets. Maintain an IP Address Management (IPAM) spreadsheet or tool. Track network address, CIDR, purpose, VLAN ID, gateway, and DHCP range for each subnet. Undocumented networks become impossible to troubleshoot when staff turns over. Tools like NetBox (open source) or commercial IPAM solutions automate this tracking.

Frequently Asked Questions

What does CIDR notation mean?

CIDR (Classless Inter-Domain Routing) notation expresses a network as an IP address followed by a slash and prefix length (e.g., 192.168.1.0/24). The prefix length tells you how many bits are the network portion. /24 means 24 network bits, leaving 8 host bits (256 total addresses). Lower prefix = larger network: /8 is huge, /30 is tiny.

How many hosts can a /24 subnet support?

A /24 subnet has 256 total addresses (2⁸). Two are reserved: the network address (.0) and broadcast address (.255). This leaves 254 usable host addresses (.1 through .254). The formula is always: usable hosts = 2^(32−prefix) − 2.

What is a subnet mask?

A subnet mask is a 32-bit number that separates the network and host portions of an IP address. /24 corresponds to 255.255.255.0 (24 ones followed by 8 zeros in binary). ANDing an IP address with its subnet mask gives the network address. For example: 192.168.1.50 AND 255.255.255.0 = 192.168.1.0 (the network address).

What is a wildcard mask?

A wildcard mask is the inverse of the subnet mask, used in Cisco ACLs and OSPF configurations. /24 subnet mask = 255.255.255.0; wildcard = 0.0.0.255. Wildcard mask bits of 1 mean 'ignore this bit,' 0 means 'match this bit.' A wildcard of 0.0.0.0 matches exactly one address; 0.0.0.255 matches any address in the /24 subnet.

What is a broadcast address?

The broadcast address is the last IP in a subnet — all host bits set to 1. For 192.168.1.0/24, the broadcast is 192.168.1.255. Packets sent to the broadcast address are received by all hosts on that subnet. It cannot be assigned to a device. This is why a /30 with 4 total addresses only provides 2 usable hosts — 2 are consumed by network and broadcast.

What are the private IP address ranges?

RFC 1918 defines three private ranges: 10.0.0.0/8 (10.0.0.0–10.255.255.255, ~16.7M addresses), 172.16.0.0/12 (172.16.0.0–172.31.255.255, ~1M addresses), and 192.168.0.0/16 (192.168.0.0–192.168.255.255, 65,536 addresses). These are not routed on the public internet. Your home router uses NAT to map your private 192.168.x.x address to its single public IP.

How do I split a /24 into smaller subnets?

Borrowing 1 bit from the host portion splits a /24 into two /25s (each with 126 usable hosts). Borrowing 2 bits gives four /26s (62 hosts each). Borrowing 4 bits gives sixteen /28s (14 hosts each). Each borrowed bit doubles the subnet count and halves the host count. The rule: subnets = 2^(borrowed bits), hosts = 2^(remaining host bits) − 2.

What is the difference between IPv4 and IPv6 subnetting?

IPv4 uses 32-bit addresses (4 octets) and /0 to /32 prefix lengths. IPv6 uses 128-bit addresses and /0 to /128 prefix lengths. A typical IPv6 subnet is /64, which provides 2⁶⁴ addresses (18 quintillion) — more than enough for any LAN. IPv6 eliminates NAT; every device gets a globally unique address. IPv6 subnets are typically allocated in /48 blocks to organizations and split into /64s for individual networks.

Related Tools