IP Subnet Calculator

Enter an IPv4 address with CIDR notation to instantly calculate network address, broadcast address, subnet mask, wildcard mask, host range, and more. All processing happens client-side -- your data never leaves your browser.

📡 Subnet Details

Network Address
-
Broadcast Address
-
Subnet Mask
-
Wildcard Mask
-
First Usable Host
-
Last Usable Host
-
Total Hosts
-
Usable Hosts
-
IP Class
-
Private / Public
-

🔢 Binary Representation

🔀 Subnet Subdivision

📚 CIDR Reference Table

How It Works

Instant Calculation

Enter an IP address with CIDR notation and see all subnet details calculated instantly as you type. No form submission needed -- results update in real time.

🔢

Binary Visualization

View the binary representation of both the IP address and subnet mask to understand exactly how network and host bits are divided.

🔀

Subnet Subdivision

See how a network can be divided into smaller subnets with detailed breakdowns of host counts and address ranges for each subdivision level.

📚

CIDR Reference

Quick-reference table showing all CIDR prefix lengths from /8 to /32 with their corresponding subnet masks and host counts.

Understanding IP Subnetting

IP subnetting is the practice of dividing a network into smaller, more manageable sub-networks. Subnetting allows network administrators to efficiently allocate IP addresses, reduce broadcast traffic, and improve network security through segmentation. The most common notation for expressing subnets is CIDR (Classless Inter-Domain Routing), which appends a prefix length to an IP address, such as 192.168.1.0/24.

Key Subnet Concepts

IP Address Classes

While classful addressing is largely historical (replaced by CIDR), the original IP classes are still referenced. Class A (0-127) supports large networks, Class B (128-191) medium networks, Class C (192-223) small networks, Class D (224-239) is for multicast, and Class E (240-255) is reserved for experimental use.

Private vs. Public IP Addresses

RFC 1918 defines three private IP address ranges: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. These addresses are not routable on the public internet and are used within local networks, VPNs, and cloud VPCs. Network Address Translation (NAT) is used to map private addresses to public addresses for internet access.

Frequently Asked Questions

What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation is a compact way to represent an IP address and its associated network mask. It is written as an IP address followed by a slash and a prefix length, such as 192.168.1.0/24. The prefix length indicates how many leading bits of the address are used for the network portion, while the remaining bits identify hosts within that network. CIDR replaced the older classful addressing system and allows for more flexible allocation of IP addresses.
What is the difference between a subnet mask and a wildcard mask?
A subnet mask identifies the network portion of an IP address by setting network bits to 1 and host bits to 0 (e.g., 255.255.255.0 for a /24 network). A wildcard mask is the bitwise inverse of the subnet mask, setting network bits to 0 and host bits to 1 (e.g., 0.0.0.255). Wildcard masks are commonly used in Cisco ACLs (Access Control Lists) and OSPF route configurations to match ranges of IP addresses.
What is a broadcast address?
A broadcast address is a special address in a subnet where all host bits are set to 1. When a packet is sent to the broadcast address, it is delivered to all devices on that subnet. For example, in the 192.168.1.0/24 network, the broadcast address is 192.168.1.255. Broadcast addresses cannot be assigned to individual hosts and are one reason why the number of usable host addresses is two fewer than the total addresses in a subnet.
Why are there fewer usable hosts than total addresses?
In a standard IPv4 subnet, two addresses are reserved: the network address (all host bits set to 0) identifies the subnet itself, and the broadcast address (all host bits set to 1) is used to send packets to all hosts on the subnet. Therefore, the number of usable host addresses is the total number of addresses minus 2. For example, a /24 subnet has 256 total addresses but only 254 usable host addresses. The exceptions are /31 (point-to-point links, 2 usable) and /32 (single host).
What are private IP address ranges?
Private IP address ranges, defined in RFC 1918, are reserved for use within local networks and are not routable on the public internet. The three private ranges are: 10.0.0.0/8 (10.0.0.0 to 10.255.255.255 with ~16.7 million addresses), 172.16.0.0/12 (172.16.0.0 to 172.31.255.255 with ~1 million addresses), and 192.168.0.0/16 (192.168.0.0 to 192.168.255.255 with 65,536 addresses). Additionally, 127.0.0.0/8 is reserved for loopback and 169.254.0.0/16 for link-local addressing.
How does subnet subdivision work?
Subnet subdivision (or subnetting) divides a larger network into smaller sub-networks by borrowing bits from the host portion to create additional network prefixes. For example, a /24 network with 254 usable hosts can be split into two /25 subnets with 126 usable hosts each, four /26 subnets with 62 hosts each, and so on. This helps optimize IP address allocation, reduce broadcast domains, and improve network security through segmentation.
Is my data safe when using this tool?
Yes. This IP subnet calculator runs entirely in your browser using JavaScript. No data is sent to any server, stored, or logged. All calculations happen locally on your device. You can verify this by disconnecting from the internet and confirming the tool still works.

Explore More Developer Tools

Check out our other free developer tools. Format JSON, decode JWTs, parse cron expressions, and more -- all from your browser with no sign-up required.

JSON Formatter →