Network address planning and subnet calculation engine

Cidr Calculator Subnet Calculator

Professional-grade CIDR subnet calculation tool that supports IPv4 and IPv6. Instantly parse Network Address, Broadcast, Available IP Ranges, Netmask and Bit Visualization. Includes CIDR Cheat Sheet and complete basic online tutorials.

Quick example:

Result

IPv4
Network Address
--
Broadcast Address
--
First Host
--
Last Host
--
Total IPs
--
Usable Hosts
--
Netmask
--
Wildcard Mask
--
Prefix Length
--
IP Type
--
CIDR Notation
--

binary view (Network / Host Bits)

IP address
Netmask
bit distribution
Network Bits (0) Host Bits (0)

CIDR Cheat Sheet

Quickly query IPv4 subnet masks and the number of available IPs. Currently prefixed with Highlight mark.

Prefix Netmask Wildcard Available Hosts

CIDR Internet Basics Tutorial

What is CIDR?

CIDR (Classless Inter-Domain Routing) is a method of IP address allocation and routing that was introduced in 1993 to replace the traditional Class A/B/C addressing architecture. CIDR use {IP}/{Prefix} notation, for example 192.168.1.0/24, among which /24 Indicates the first 24 bits are Network Bits.

Subnet Mask

Subnet Mask is a 32-bit binary number used to divide IP addresses into network addresses and host addresses. Network Bits are set to 1 and Host Bits are set to 0. For example /24 The Subnet Mask is 255.255.255.0

Prefix Length (prefix length)

Prefix Length is the number after the slash in CIDR notation, which represents the number of Network Bits. The Prefix Length range is 0-32 for IPv4 and 0-128 for IPv6. The longer the prefix, the smaller the network and the fewer available hosts.

Why not use Class A/B/C?

Traditional Class addressing (Class A: /8, Class B: /16, Class C: /24) is too rigid and will cause a lot of IP waste. For example, if an organization needs 300 IPs, Class C (254 Hosts) is not enough, but Class B (65,534 Hosts) is far more than needed. CIDR allows prefixes of any length, enabling more flexible IP allocation and effectively delaying the exhaustion of IPv4 addresses.

Frequently Asked Questions (FAQ)

What is a Network Address?
The Network Address is the first IP address in the subnet, and all Host Bits are 0. It represents the entire network itself and cannot be used for assignment to hosts. In IPv4, it is ANDed with the subnet mask.
What is a Broadcast Address?
The Broadcast Address is the last IP address in the subnet and all Host Bits are 1. Used to send broadcast packets to all hosts in the subnet. IPv6 does not have Broadcast, but uses Anycast and Multicast instead.
Why is the number of available hosts "total number of IPs - 2"?
Each IPv4 subnet has two reserved addresses that cannot be assigned to hosts: Network Address (Host Bits are all 0) and Broadcast Address (Host Bits are all 1). Therefore the number of available Hosts = 2^HostBits - 2. For example /24 There are 8 Host Bits, available Hosts = 2^8 - 2 = 254.

Note:/31(2 IPs) and /32(1 IP) is the exception. RFC 3021 definition /31 Can be used on point-to-point links, both IPs can be used.
What is the difference between CIDR calculation for IPv4 and IPv6?
IPv6 uses 128-bit addresses, and the Prefix Length range is 0-128. The biggest differences from IPv4 are:
• IPv6 has no Broadcast Address
• Standard subnets are typically used /64(2^64 IPs)
• Common assignments are /48(to the organization) or /56(for home users)
• The total number of IPv6 IPs is very large. Usually, "available hosts" are not calculated, but the number of allocable subnets is calculated.
What is Wildcard Mask?
Wildcard Mask is the inverse code (bitwise NOT) of Netmask, and is used for the ACL (Access Control List) of Cisco network equipment and the Network Statement of routing protocols such as OSPF and EIGRP. For example Netmask 255.255.255.0 The Wildcard is 0.0.0.255, indicating that any match can be made as long as the last 8 bits.
How to calculate if a subnet contains an IP?
AND the IP address with the Netmask. If the result is equal to the Network Address, the IP belongs to this subnet. For example 192.168.1.15/24:
192.168.1.15 AND 255.255.255.0 = 192.168.1.0 = Network Address ✓
What is VLSM (Variable Length Subnet Mask)?
VLSM allows the use of different Prefix Lengths in a network to perform more detailed segmentation of subnets. For example, change 192.168.1.0/24 cut to /25(126 Hosts),/26(62 Hosts) vs. two /27(30 Hosts) to maximize IP usage efficiency.

Enter the CIDR above and click the "Calculate" button

Or click the quick example button to try it out