What Is the IPv4 CIDR & Subnet Mask Calculator?
CIDR (Classless Inter-Domain Routing) is a method for allocating IP addresses and routing IP packets.
It replaced the older class-based network design (Class A, B, C) to slow the exhaustion of IPv4 address space.
How Does the IPv4 CIDR & Subnet Mask Calculator Work?
The calculator computes the 32-bit subnet mask bitmask by setting the first N prefix bits to 1 and remaining host bits to 0.
Total addresses are 2 raised to the power of available host bits.
Usable hosts subtract network identifier (.0) and broadcast address (.255).
IPv4 CIDR & Subnet Mask Calculator Formula & Variables
The core mathematical equation utilized by this calculator is expressed as:
Each IPv4 address contains 32 bits. The CIDR prefix determines the network bits, leaving 32 - prefix for host addressing.
How to Use the IPv4 CIDR & Subnet Mask Calculator
- Enter your subnet prefix number without the slash (e.g., 24).
- Read the dotted-decimal subnet mask (255.255.255.0) and usable host capacity.
Step-by-Step Example Calculation
Standard Class C /24 Subnet
Input Values:
Understanding Your Result
Subnet mask determines the boundary between network routing and local device addressing.
Wildcard mask is used in Cisco access control lists (ACLs) and OSPF router configurations.
Factors That Affect the Result
- Point-to-point router links (/31) vs standard broadcast subnets.
When Should You Use This Calculator?
- Configuring cloud VPCs (AWS, GCP, Azure), enterprise firewalls, and home router DHCP ranges.
Assumptions & Limitations
- Standard IPv4 32-bit architecture.
Frequently Asked Questions
Calculation Accuracy & Reference Note
Standard IETF RFC 1878 and RFC 3021 compliance.