Developer

Subnet Calculator — Free 2026

Enter an IPv4 address and CIDR prefix to instantly calculate network details, host range and subnet mask.

Please enter a valid IPv4 address.
Enter a value between /0 and /32.

Subnet Details

Network Address
Broadcast Address
Subnet Mask
Wildcard Mask
Host Range
Total Hosts
Usable Hosts
IP Class

Binary Representation

How It Works

  1. Enter an IP address
  2. Set the CIDR prefix
  3. Read the results
Advertisement
728x90 — AdSense Leaderboard

Understanding IP Subnetting

Subnetting is one of the fundamental concepts in networking. It allows network administrators to divide a single IP address range into smaller, isolated segments called subnets. Each subnet operates as an independent network, which improves security by limiting broadcast traffic and enabling access control between segments. Understanding subnetting is essential for anyone working with network infrastructure, from small office setups to enterprise data centers.

How CIDR Notation Works

Before CIDR was introduced in 1993, IP addresses were divided into rigid classes (A, B, C) that wasted vast numbers of addresses. CIDR replaced this with a flexible prefix-length system. The notation 192.168.1.0/24 means the first 24 bits identify the network and the remaining 8 bits identify hosts within that network. This gives 256 total addresses (2^8), of which 254 are usable for devices. Shorter prefixes like /16 create larger networks (65,536 addresses), while longer prefixes like /30 create tiny point-to-point links with just 2 usable hosts.

Subnet Masks Explained

A subnet mask is a 32-bit number that separates the network portion from the host portion of an IP address. For a /24 network, the mask is 255.255.255.0 — meaning the first three octets are all 1s in binary (network) and the last octet is all 0s (hosts). The wildcard mask is the bitwise inverse of the subnet mask and is used in Cisco router configurations for access control lists (ACLs) and OSPF area definitions.

Common Subnet Sizes

CIDRMaskUsable HostsUse Case
/30255.255.255.2522Point-to-point link
/28255.255.255.24014Small office
/24255.255.255.0254Standard LAN
/16255.255.0.065,534Large campus

For testing network-related regular expressions such as IP address patterns, try our regex tester. If you need to generate secure credentials for network devices, use the password generator.

Frequently Asked Questions

What is a subnet?
A subnet (subnetwork) is a logical subdivision of an IP network. Subnetting divides a larger network into smaller, more manageable segments, improving performance, security, and address allocation efficiency.
What does CIDR notation mean?
CIDR (Classless Inter-Domain Routing) notation uses a slash followed by a number (e.g., /24) to indicate how many bits of the IP address are used for the network portion. A /24 means the first 24 bits are the network address, leaving 8 bits (256 addresses) for hosts.
What is the difference between total hosts and usable hosts?
Total hosts is 2 raised to the power of host bits (32 minus CIDR). Usable hosts is total hosts minus 2, because the first address is reserved for the network address and the last for the broadcast address. For a /24 subnet, total hosts is 256 but usable hosts is 254.
What is a wildcard mask?
A wildcard mask is the inverse of a subnet mask. Where the subnet mask has 1-bits, the wildcard has 0-bits, and vice versa. It is commonly used in Cisco ACLs and OSPF configurations. For a /24 subnet mask of 255.255.255.0, the wildcard mask is 0.0.0.255.

Comments

Advertisement
728x90 — AdSense Leaderboard