Tools You'll Use Again
Search 521+ tools... Ctrl K
Guides 0
100% Private Client-Side Processing

IPv4 Subnet & CIDR Prefix Calculator

Network engineering IP subnet calculator. Input any IPv4 address with CIDR prefix to determine network ID, broadcast address, subnet mask, usable host IP range, and RFC 1918 private network classification.

Loading IPv4 Subnet & CIDR Prefix Calculator...

What is the IPv4 Subnet & CIDR Prefix Calculator?

This tool calculates network addresses, broadcast addresses, usable host ranges, and wildcard masks from an IPv4 address and CIDR prefix length.

What Goes In
IPv4 address (e.g. 192.168.1.50) and subnet mask or CIDR prefix (e.g. /24 or 255.255.255.0).
What Comes Out
Network address, broadcast address, first and last usable host IP, total addresses, usable hosts count, binary breakdown, and IP classification.

Classless Inter-Domain Routing (CIDR) Bitwise Arithmetic

An IPv4 address consists of 32 bits divided into 4 octets. The subnet mask determines where the network prefix ends and the host identifier begins. The network address is calculated via bitwise AND: $\text{Network} = \text{IP} \ \& \ \text{Mask}$. The broadcast address is obtained by setting all host bits to 1: $\text{Broadcast} = \text{Network} \ | \ (\sim\text{Mask})$. Usable hosts are total addresses minus 2 (network and broadcast).

CIDR Notation: A concise representation: /24 indicates that the first 24 bits belong to the network, leaving 8 bits for host addressing ($2^8 = 256$ total IPs).
Usable Hosts Formula: Calculated as $2^{(32 - \text{prefix})} - 2$ for prefixes up to /30. A /31 prefix is used for point-to-point links (RFC 3021).

How to Use the IPv4 Subnet & CIDR Prefix Calculator

1

Enter IPv4 Address

Type any valid IPv4 address (e.g. 10.0.0.1 or 172.16.20.5).

2

Select Subnet Mask / CIDR

Choose your CIDR prefix (/8 to /32) from the dropdown or type the dotted-decimal subnet mask.

3

Review Subnet Allocation

Instantly view the Network ID, usable host IP range, broadcast address, and total usable host count.

Key Settings & Parameters

Setting What It Controls Recommended Default
CIDR Prefix (/8 to /32) Controls subnet size. Common prefixes: /24 (254 hosts), /26 (62 hosts), /28 (14 hosts), /30 (2 hosts for point-to-point). /24 for office LANs, /28 for small DMZs

Common Pitfalls to Avoid

  • • Assigning the network address or broadcast address to a host device
    The first address (host bits all 0) is reserved for the network ID, and the last address (host bits all 1) is reserved for broadcast.
  • • Overlapping CIDR blocks in cloud VPC peering
    Ensure peering VPCs have non-overlapping IP address spaces before creating route tables.

Pro Tips for Best Results

  • Remember the powers of 2 for host bits: /24 = 254 usable, /25 = 126, /26 = 62, /27 = 30, /28 = 14, /29 = 6, /30 = 2.

Local Processing Guarantee

Zero server communication. Internal corporate IP schemes and private cloud topologies are never sent across the internet.

Engine: In-browser binary bitwise calculator

When to Use

  • Designing AWS VPC, Azure VNet, or Google Cloud subnet topologies without overlapping CIDR blocks.
  • Configuring enterprise router interfaces, VLAN boundaries, and DHCP scopes.
  • Preparing for Cisco CCNA/CCNP, CompTIA Network+, or AWS Certified Advanced Networking exams.
When NOT to Use:

Operational Boundaries & Limits:
  • • Valid only for IPv4 dotted-decimal notation. Prefix lengths must be between 0 and 32.

Frequently Asked Questions

In standard IPv4 subnets, the very first address is reserved as the Network Identifier, and the very last address is reserved as the Subnet Broadcast Address.

A /24 prefix equals 255.255.255.0, providing 256 total IP addresses and 254 usable host addresses.

RFC 1918 defines three non-routable private IP ranges: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16, reserved for internal home and enterprise networks.

Related Tools You Might Need

Next logical workflows