IP Subnet Calculator

IPv4 CIDR Instant Results Visual Map Offline

Instantly calculate subnet mask, network address, broadcast address, wildcard mask, and usable host range from CIDR notation. Features a visual subnet map, IP-in-subnet checker, and calculation history. All math runs client-side — works offline, no data leaves your browser.

Calculate Subnet

Enter IP with CIDR prefix (e.g., 10.0.0.0/8) — results update live

/8 /16 /24 /30
Class A Private Class B Private Class C Private /28 (16 IPs) Point-to-Point
CIDR Quick Reference
CIDRSubnet MaskHosts
/8255.0.0.016,777,214
/16255.255.0.065,534
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522
Recent Calculations
  • No calculations yet

Subnet Information

IP Subnet Calculator

Enter a CIDR address to see subnet information. Results update live as you type.

CLI Commands for Subnet Calculation

Linux: Calculate subnet with ipcalc
$ ipcalc 192.168.1.0/24
Windows: Show IP configuration
C:\> ipconfig /all

Understanding IP Subnetting

Subnetting is the practice of dividing a network into smaller, more manageable sub-networks (subnets). This improves network performance, security, and simplifies administration. Each subnet has its own network address, broadcast address, and range of usable host addresses.

Subnetting is essential for efficient IP address allocation, reducing broadcast domains, and implementing network security policies. Whether you are designing a corporate network or configuring a home lab, understanding subnets is a fundamental networking skill.

CIDR Notation Explained

CIDR (Classless Inter-Domain Routing) notation combines an IP address with its subnet mask in a compact format: 192.168.1.0/24. The number after the slash indicates how many bits are used for the network portion (prefix length).

CIDR replaced the older classful addressing system (Class A, B, C) and allows for much more flexible allocation of IP addresses. Instead of being limited to /8, /16, or /24 boundaries, networks can be divided at any bit boundary from /0 to /32.

Network vs Broadcast Address

Network Address

The first address in a subnet, where all host bits are 0. It identifies the network itself and cannot be assigned to a host. For 192.168.1.0/24, the network address is 192.168.1.0.

Broadcast Address

The last address in a subnet, where all host bits are 1. Packets sent here reach all hosts on the subnet. For 192.168.1.0/24, the broadcast address is 192.168.1.255.

RFC 1918 Private Address Ranges

RFC 1918 defines three private IP address ranges that are not routed on the public internet. These are used for internal networks and require NAT to access the internet.

RangeCIDRAddressesTypical Use
10.0.0.0 – 10.255.255.25510.0.0.0/816,777,216Large enterprises, data centers
172.16.0.0 – 172.31.255.255172.16.0.0/121,048,576Medium organizations
192.168.0.0 – 192.168.255.255192.168.0.0/1665,536Home networks, small offices

Subnet Calculation Formula

  • Host bits: 32 − prefix length
  • Total addresses: 2(host bits)
  • Usable hosts: 2(host bits) − 2
  • Number of subnets: 2(borrowed bits)
  • Wildcard mask: 255.255.255.255 − subnet mask

Frequently Asked Questions

CIDR (Classless Inter-Domain Routing) notation combines an IP address with a prefix length, like 192.168.1.0/24, where /24 means the first 24 bits define the network. This calculator instantly computes subnet mask, network address, broadcast address, usable host range, and wildcard mask from any CIDR input. Results update live as you type or drag the CIDR slider.
The CIDR prefix indicates how many leading bits are 1 in the subnet mask. For /24, the mask is 11111111.11111111.11111111.00000000 = 255.255.255.0. This calculator shows both dotted-decimal and binary representations instantly. Common conversions: /8 = 255.0.0.0, /16 = 255.255.0.0, /24 = 255.255.255.0, /28 = 255.255.255.240, /30 = 255.255.255.252.
The Visual Subnet Map displays the address space as a proportional horizontal bar. It shows three color-coded segments: the network address (teal), usable host addresses (gradient fill), and broadcast address (orange). This helps you visualize how much of the subnet is usable versus reserved. Smaller subnets like /30 show mostly reserved space, while /24 shows mostly usable.
Use the IP-in-Subnet Checker below the results. Type any IP address and it instantly tells you whether that IP falls within the calculated subnet. If the IP is outside the subnet, it shows which subnet the IP would belong to using the same prefix length. The check uses bitwise AND: (IP AND mask) must equal the network address.
Usable hosts = 2^(32 - prefix) - 2. The two subtracted addresses are the network address (all host bits 0) and broadcast address (all host bits 1). Examples: /24 = 254 hosts, /28 = 14 hosts, /30 = 2 hosts (point-to-point links). Special cases: /31 has 2 usable addresses (RFC 3021), and /32 is a single host route. This tool works fully offline after the page loads and your calculation history persists in localStorage across sessions.
Yes. Switch to the Practice Questions tab to generate randomized subnetting problems at Easy, Medium, or Hard difficulty. Easy covers /8, /16, /24 masks. Medium covers /20-/28. Hard includes unusual prefixes and extra fields like wildcard mask. Check your answers instantly, reveal solutions, or download the worksheet as a printable PNG for offline study.

About This Tool

This IP Subnet Calculator is maintained by Anish Nath, a software engineer with expertise in networking and security tools. The calculator uses standard IPv4 bit-math subnetting algorithms to compute accurate network information from CIDR notation.

All calculations run 100% client-side in your browser for instant results. Features include a Visual Subnet Map that shows address space proportionally, an IP-in-Subnet Checker for verifying IP membership, and Calculation History saved locally for quick access to previous lookups. The tool supports the full range of CIDR prefixes (/0 through /32) and correctly identifies RFC 1918 private address ranges and network classes.

Your input data never leaves your browser. No data is sent to any server. This tool works fully offline, making it ideal for network engineers, system administrators, and students studying for CCNA or CompTIA Network+ certifications.

Support This Free Tool

Every coffee helps keep the servers running. Every book sale funds the next tool I'm dreaming up. You're not just supporting a site — you're helping me build what developers actually need.

500K+ users
200+ tools
100% private
Privacy Guarantee: Private keys you enter or generate are never stored on our servers. All tools are served over HTTPS.