Command Palette

Search for a command to run...

CIDR / Subnet

CIDR / Subnet Calculator

Enter an IPv4 CIDR to instantly calculate the network address, broadcast address, and host range.

Input
Enter a value in IPv4 CIDR format (IP/prefix).

Spaces are ignored. Prefix length supports 0–32.

Result
Everything is calculated locally in your browser. Your input is not sent anywhere.

Currently IPv4 only.

What

CIDR / Subnet Calculator definition

CIDR notation defines an IP network range using an address and prefix length.

Cases

Use Cases

1

Calculate usable host ranges

2

Plan subnets for VPC or VLANs

3

Validate whether an IP belongs to a subnet

How To

How to Calculate Subnet Information

A step-by-step guide to using CIDR notation to find network details.

1

Enter CIDR

Type an IP address with prefix length (e.g., 192.168.1.0/24).

2

View results

Network address, broadcast, and host range are calculated automatically.

3

Use the info

Check the subnet mask, wildcard mask, and usable host count.

Knowledge

Understanding IP Subnetting

What is CIDR?
CIDR (Classless Inter-Domain Routing) replaced the old class-based IP addressing. The notation IP/prefix (like 192.168.1.0/24) specifies both the network address and how many bits identify the network portion.
Subnet Mask
A subnet mask separates the network and host portions of an IP address. In /24, the first 24 bits are network (255.255.255.0). The remaining 8 bits are for host addresses within that network.
Network and Broadcast Addresses
The first address in a subnet (all host bits 0) is the network address. The last address (all host bits 1) is the broadcast address. These two are reserved and can't be assigned to hosts.
Calculating Host Capacity
For prefix /n, the number of addresses is 2^(32-n). Usable hosts = addresses - 2 (network and broadcast). A /24 has 256 addresses, 254 usable hosts. A /30 has 4 addresses, 2 usable hosts.
Common Subnet Sizes
/32 is a single host. /30 is point-to-point links (2 hosts). /24 is common for small networks (254 hosts). /16 is a large network (65,534 hosts). /8 is very large (16+ million hosts).

FAQ

CIDR / Subnet FAQ

What is CIDR?
CIDR (Classless Inter-Domain Routing) uses a “/number” (prefix length) to represent an IP network range.
What does /24 mean?
It means the first 24 bits are the network portion. In IPv4, the remaining 8 bits are the host portion, so the subnet contains 256 addresses.
What are the network and broadcast addresses?
The network address is the first address in the subnet. The broadcast address is the last address, used to reach all hosts in that subnet.
How are usable hosts calculated?
Usually it’s total addresses minus 2 (excluding network and broadcast). Example: /24 → 256-2=254.
Why do /31 and /32 look different?
/31 is commonly used for point-to-point links where both addresses can be used as hosts, and /32 represents a single host (one address).
What is a wildcard mask used for?
It's the bitwise inverse of the subnet mask and is used by some network devices to express match ranges (e.g., ACLs).
Is my input uploaded anywhere?
No. This tool runs entirely in your browser and does not send your input externally.
CIDR / Subnet Calculator