Calculator

IP-Subnet Calculator

IP-Subnet Calculator

🌐 IP Subnet Calculator

Advanced IPv4 subnetting tool to calculate CIDR, subnet masks, wildcard masks, and host ranges. Perfect for network engineers, students, and IT professionals.

🔢 IPv4 Subnet Calculator
Network Address
192.168.1.0
CIDR: /24
Broadcast Address
192.168.1.255
Last IP
Subnet Mask
255.255.255.0
Wildcard: 0.0.0.255
Total Hosts
256
Usable: 254

📋 Host Range

Usable Range: 192.168.1.1 - 192.168.1.254

Binary Netmask:

11111111.11111111.11111111.00000000
📐 CIDR Conversion Tool
/24
Subnet Mask
255.255.255.0
Usable IPs
254

What is CIDR?

Classless Inter-Domain Routing (CIDR) is a method for allocating IP addresses and IP routing. The notation /24 indicates the number of bits set to 1 in the subnet mask.

🏷️ IP Address Classes
ClassRangeDefault Subnet MaskCIDR
A1.0.0.0 - 126.255.255.255255.0.0.0/8
B128.0.0.0 - 191.255.255.255255.255.0.0/16
C192.0.0.0 - 223.255.255.255255.255.255.0/24
D224.0.0.0 - 239.255.255.255MulticastN/A
E240.0.0.0 - 255.255.255.255ExperimentalN/A

Private IP Ranges (RFC 1918)

  • Class A: 10.0.0.0 - 10.255.255.255
  • Class B: 172.16.0.0 - 172.31.255.255
  • Class C: 192.168.0.0 - 192.168.255.255

💡 About Subnetting

Subnetting is the practice of dividing a network into two or more networks. It increases routing efficiency, enhances network security, and reduces broadcast domain size. The subnet mask determines which part of the IP address is the network portion and which part is the host portion.

Understanding IP Subnetting & Calculations

IP subnetting is a fundamental concept in networking that allows administrators to divide larger networks into smaller, manageable sub-networks. This improves performance, security, and organization. Understanding how to calculate subnets, masks, and host ranges is essential for any IT professional. This calculator simplifies these complex binary calculations into instant, accurate results.

Subnet Calculation Formulas

Number of Subnets Formula
$$\text{Number of Subnets} = 2^{\text{subnet bits}}$$
$$\text{Example: } 2^3 = 8 \text{ subnets}$$
Subnet Bits: The number of bits borrowed from the host portion to create subnets.
Number of Hosts Formula
$$\text{Usable Hosts} = 2^{\text{host bits}} - 2$$
$$\text{Example: } 2^8 - 2 = 256 - 2 = 254 \text{ hosts}$$
Why -2? One address is reserved for the Network Address (first) and one for the Broadcast Address (last).
Subnet Mask to CIDR Conversion
$$\text{CIDR} = \sum(\text{Binary 1s in Mask})$$
$$\text{Example: } 255.255.255.0 = 11111111.11111111.11111111.00000000 = /24$$
CIDR: Classless Inter-Domain Routing notation counts the number of network bits set to 1.

CIDR & Subnet Mask Reference Table

CIDRSubnet MaskTotal IP AddressesUsable Hosts
/32255.255.255.25510
/30255.255.255.25242
/29255.255.255.24886
/28255.255.255.2401614
/27255.255.255.2243230
/26255.255.255.1926462
/25255.255.255.128128126
/24255.255.255.0256254
/23255.255.254.0512510
/16255.255.0.065,53665,534
/8255.0.0.016,777,21616,777,214

Subnetting Examples

Example 1: Calculating a /24 Network
Network: 192.168.1.0/24

Calculation:
• Host bits = 32 - 24 = 8 bits
• Total IPs = 2^8 = 256
• Usable Hosts = 256 - 2 = 254
• Mask = 255.255.255.0

Range: 192.168.1.1 to 192.168.1.254
Example 2: Subnetting for Point-to-Point Links (/30)
Network: 10.0.0.0/30

Calculation:
• Host bits = 32 - 30 = 2 bits
• Total IPs = 2^2 = 4
• Usable Hosts = 4 - 2 = 2
• Mask = 255.255.255.252

Usage: Perfect for connecting two routers directly (only 2 IPs needed).

Frequently Asked Questions About Subnetting

What is a Subnet Mask?
A subnet mask is a 32-bit number that separates the IP address into the network and host addresses. It "masks" the network portion. For example, 255.255.255.0 indicates the first 24 bits are the network, and the last 8 bits are for hosts.
What is CIDR Notation?
CIDR (Classless Inter-Domain Routing) is a compact way to write a subnet mask. It uses a slash followed by the number of network bits. Instead of writing 255.255.255.0, you simply write /24. It's faster and cleaner for network documentation.
Why do we subtract 2 from usable hosts?
Every subnet has two reserved addresses that cannot be assigned to devices: the first address is the Network Address (identifies the subnet itself) and the last address is the Broadcast Address (used to communicate with all devices in that subnet).
What is a Wildcard Mask?
A wildcard mask is the inverse of a subnet mask. It is calculated by subtracting the subnet mask from 255.255.255.255. For a /24 (255.255.255.0), the wildcard mask is 0.0.0.255. Wildcard masks are commonly used in Cisco Access Control Lists (ACLs).
What are Private IP Addresses?
Private IP addresses (RFC 1918) are reserved for internal networks and are not routable on the public internet. Ranges include 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. They allow organizations to build large internal networks without consuming public IP addresses.

Conclusion

Mastering IP subnetting is essential for efficient network design, troubleshooting, and management. By accurately calculating subnets, masks, and host ranges, network professionals can optimize IP address allocation, reduce broadcast traffic, and enhance security. Whether you are designing a small home network or a large enterprise infrastructure, this IP Subnet Calculator provides the precise data needed for effective network planning. Bookmark this tool for quick access during your daily networking tasks.

Shares: