Math
IPv4 Subnet & CIDR Calculator
Calculate IPv4 network address, broadcast address, subnet mask, wildcard mask, first/last usable host IPs, and host count from IP and CIDR prefix.
How to Use This Calculator
Enter IPv4 Address
Input any IPv4 address (e.g., 192.168.1.42 or 10.0.15.0).
Select CIDR Prefix (/0 to /32)
Choose subnet mask prefix such as /24, /22, or /16.
Frequently Asked Questions
How many usable host IPs are in a /24 subnet?
A /24 subnet (255.255.255.0) has 256 total IP addresses and 254 usable host addresses (excluding network and broadcast).
How do you calculate usable hosts in CIDR?
Usable Hosts = 2^(32 − CIDR) − 2 for prefixes /0 through /30. A /31 point-to-point link has 2 usable IPs (RFC 3021), and /32 is a single host.
What is a wildcard mask?
The bitwise inverse of the subnet mask (for example, 0.0.0.255 for /24), used in Cisco ACLs and OSPF network statements.
What are RFC 1918 private IP ranges?
10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are reserved for private internal networks.
Related Calculators
- Percentage Calculator — Calculate percentages, increases, and decreases.
- Fraction Calculator — Add, subtract, multiply, and divide fractions.
- GCD & LCM — Calculate greatest common divisor and least common multiple.
- Prime Factorization — Find prime factors of any number.
- Factorial Calculator — Calculate factorial of a number.
- Logarithm Calculator — Calculate logarithms with any base.