Subnet / CIDR Calculator
Free IPv4 subnet calculator: enter an IP and CIDR prefix or subnet mask to get network, broadcast, host range, and wildcard mask instantly. No sign-up.
Added Jun 1, 2026
Input
Result
Enter a value for ip address to see your result.
How it works
Calculates IPv4 subnet details from an IP address and CIDR prefix or subnet mask. Returns network and broadcast addresses, usable host range, host count, wildcard mask, and dotted-binary representation — essential for network design, firewall rules, and cloud VPC planning.
Formula
Network = IP AND Mask · Broadcast = Network OR Wildcard
- Mask
- 32-bit value with leading 1s (from CIDR prefix or subnet mask)
- Wildcard
- Bitwise NOT of the subnet mask (used in ACLs)
- Usable hosts
- 2^(32−prefix) − 2 (except /31 and /32 per RFC 3021)
Step by step
- 01Enter an IPv4 address and choose CIDR prefix or subnet mask input.
- 02The calculator derives the subnet mask from the prefix (or reads the mask directly).
- 03Network address = IP AND mask; broadcast = network OR wildcard (inverted mask).
- 04First and last usable hosts exclude network and broadcast (except /31 point-to-point links).
Examples
Home LAN · 192.168.1.100/24
A /24 on 192.168.1.x yields 254 usable hosts — the classic home router subnet.
Inputs
- IP address:
- 192.168.1.100
- Subnet input:
- cidr
- CIDR prefix:
- 24
Result
- Network address:
- 192.168.1.0
- Broadcast address:
- 192.168.1.255
- First usable host:
- 192.168.1.1
- Last usable host:
- 192.168.1.254
- Usable hosts:
- 254
- Subnet mask:
- 255.255.255.0
- CIDR notation:
- 192.168.1.0/24
Office VLAN · 10.20.30.45/26
A /26 splits a /24 into four subnets of 62 hosts each — common for office VLANs.
Inputs
- IP address:
- 10.20.30.45
- Subnet input:
- cidr
- CIDR prefix:
- 26
Result
- Network address:
- 10.20.30.0
- Broadcast address:
- 10.20.30.63
- First usable host:
- 10.20.30.1
- Last usable host:
- 10.20.30.62
- Usable hosts:
- 62
- CIDR notation:
- 10.20.30.0/26
Frequently asked questions
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) writes a subnet as an IP address followed by a slash and prefix length — e.g. 192.168.1.0/24. The prefix (24) means the first 24 bits are the network portion; the remaining 8 bits are available for hosts.
What is a wildcard mask?
A wildcard mask is the bitwise inverse of the subnet mask. It is used in Cisco ACLs and some firewall rules to match address ranges. For a /24 subnet, the subnet mask is 255.255.255.0 and the wildcard mask is 0.0.0.255.
How many usable hosts are in a /24 subnet?
A /24 has 256 total addresses. Subtracting the network address (.0) and broadcast address (.255) leaves 254 usable host addresses — the most common size for a small LAN.
What is the difference between subnet mask and CIDR?
They represent the same thing in different formats. CIDR /24 equals subnet mask 255.255.255.0 — both mean 24 leading network bits. CIDR is compact; dotted-decimal masks are common in router configs.