IP Subnet Calculator
Enter any IPv4 address with a CIDR prefix or subnet mask to get the network address, broadcast, host range, wildcard mask, and usable host count instantly.
🌐 What is IP Subnetting?
IP subnetting is the fundamental networking technique of dividing a single IP address block into smaller sub-networks (subnets). Every device on a network needs a unique IP address, but IP addresses are not unlimited - the entire IPv4 address space contains only about 4.3 billion addresses (2³²). Subnetting allows network engineers to allocate IP space efficiently, segment networks for security and performance, and control broadcast traffic by confining it to smaller domains.
An IPv4 address like 192.168.1.100 is a 32-bit number divided into a network portion and a host portion. The subnet mask (or CIDR prefix length) determines where that boundary falls. A /24 mask (255.255.255.0) means the first 24 bits identify the network (192.168.1.0) and the remaining 8 bits identify hosts - allowing up to 254 devices (256 minus the network address and broadcast address). A /16 (255.255.0.0) gives the same first 16 bits for the network and 16 bits for hosts - 65,534 possible host addresses.
Real-world subnetting applications are everywhere. Enterprise networks use subnets to separate departments (Finance on 10.1.1.0/24, HR on 10.1.2.0/24) so that a compromise in one segment does not spread laterally. Data centres use Variable Length Subnet Masking (VLSM) to allocate exactly the right-sized subnet to each server cluster. Internet service providers (ISPs) allocate customer blocks like 203.0.113.0/28 (14 usable IPs) or /26 (62 IPs) based on stated needs. Router ACLs use wildcard masks to specify which subnets rules apply to.
This calculator handles both CIDR prefix notation (e.g., /24) and traditional dotted decimal subnet masks (e.g., 255.255.255.0). It computes the network address, broadcast address, usable host range, wildcard mask, and displays full binary representations - the same information a network engineer reads when configuring a router or firewall. The binary view makes the bitwise AND operation behind subnetting immediately visible.
📐 Formula
📖 How to Use This Calculator
Steps
💡 Example Calculations
Example 1 — Class C Subnet (the Most Common)
192.168.10.50 / 24
Example 2 — Smaller Subnet for a VLAN
10.10.5.1 / 28 (14 hosts - typical for a small VLAN)
Example 3 — Large Enterprise Block
172.16.0.0 / 16
❓ Frequently Asked Questions
🔗 Related Calculators
What is IP subnetting?
IP subnetting is the practice of dividing a single IP network into multiple smaller sub-networks (subnets). Each subnet has its own network address, broadcast address, and range of host addresses. Subnetting allows efficient allocation of IP space, improves network security through segmentation, and reduces broadcast traffic by confining broadcasts to smaller domains.
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation represents an IP address and its prefix length: e.g., 192.168.1.0/24. The number after the slash is the prefix length - how many leading bits of the address are the 'network' portion. /24 means 24 bits for the network and 8 bits for hosts, giving 256 addresses and 254 usable hosts.
How many hosts can each subnet size support?
Usable hosts = 2^(32−prefix) − 2. Examples: /24 = 254 hosts, /23 = 510, /22 = 1022, /16 = 65534, /8 = 16,777,214. The /31 exception (RFC 3021): 2 hosts with no subtraction for point-to-point links. /32 = single host route (0 usable hosts for a subnet, but used for loopbacks/static routes).
What is the difference between a subnet mask and a wildcard mask?
A subnet mask uses 1s for the network portion and 0s for the host portion: 255.255.255.0 = /24. A wildcard mask is the bitwise inverse: 0.0.0.255. Wildcard masks are used in Cisco ACLs and OSPF configurations to specify which bits must match. A 0 bit = must match; a 1 bit = any value allowed.
What are private IP address ranges?
RFC 1918 defines three private IP ranges not routed on the public internet: 10.0.0.0/8 (Class A, 16.7 million addresses), 172.16.0.0/12 (Class B, 1.05 million addresses), and 192.168.0.0/16 (Class C, 65,536 addresses). Home routers and enterprise networks use these ranges internally, with NAT (Network Address Translation) mapping them to public IPs.
What is the network address and broadcast address?
The network address is the first address in a subnet - all host bits are 0. It identifies the subnet itself and cannot be assigned to a host. The broadcast address is the last address - all host bits are 1. Packets sent to the broadcast address are received by all hosts in the subnet. Both are unusable as host addresses, which is why usable hosts = 2^(32−prefix) − 2.
How is the network address calculated?
Network address = IP address AND subnet mask (bitwise). Example: 192.168.1.100 AND 255.255.255.0 = 192.168.1.0. In binary: 11000000.10101000.00000001.01100100 AND 11111111.11111111.11111111.00000000 = 11000000.10101000.00000001.00000000 = 192.168.1.0. This calculator shows the full binary representation.
What is IP address classification (Class A, B, C, D, E)?
The original classful system: Class A (0.0.0.0–127.255.255.255, first bit 0, /8 default): 128 networks × 16M hosts. Class B (128.0.0.0–191.255.255.255, first 2 bits 10, /16 default): 16,384 networks × 65K hosts. Class C (192.0.0.0–223.255.255.255, first 3 bits 110, /24 default): 2M networks × 254 hosts. Class D (224–239): multicast. Class E (240–255): reserved. CIDR replaced this rigid system in 1993.
How do I subnet a network for multiple departments?
Example: you have 192.168.10.0/24 (254 hosts) and need 4 equal subnets. Borrow 2 bits from the host portion: /26 gives 4 subnets of 64 addresses each (62 usable hosts). Subnets: 192.168.10.0/26, 192.168.10.64/26, 192.168.10.128/26, 192.168.10.192/26. The key formula: to create N subnets, borrow ⌈log₂(N)⌉ bits from the host portion.