IP Address Range Calculator
Enter an IPv4 address with a CIDR prefix to instantly see the network address, broadcast address, first and last usable hosts, total and usable host counts, subnet mask, wildcard mask, and binary breakdown. Handles /0 through /32, including special cases /31 and /32.
Common CIDR Prefix Reference
A quick lookup for the most frequently used IPv4 prefixes. The calculator above handles every prefix from /0 to /32.
| CIDR | Subnet Mask | Wildcard | Total Addrs | Usable Hosts | Host Bits |
|---|
What Is an IP Address Range?
An IP address range is the set of all addresses within a subnet. For IPv4, every subnet is defined by a network address and a subnet mask (or CIDR prefix). The range includes the network address (the first address, used to identify the subnet) and the broadcast address (the last address, used to send data to all hosts in the subnet). The addresses between them are usable host addresses that can be assigned to devices.
For example, the subnet 192.168.1.0/24 has a network address of
192.168.1.0, a broadcast address of 192.168.1.255, and usable
hosts from 192.168.1.1 to 192.168.1.254. That's 256 total
addresses and 254 usable hosts.
How to Calculate the Network Address
The network address is found by performing a bitwise AND between the IP address and the subnet mask. In binary, this zeroes out all host bits:
Example — 192.168.1.10/24:
IP: 11000000.10101000.00000001.00001010
Mask: 11111111.11111111.11111111.00000000
AND: 11000000.10101000.00000001.00000000 → 192.168.1.0
How to Calculate the Broadcast Address
The broadcast address is found by performing a bitwise OR between the network address and the wildcard mask (the inverse of the subnet mask). In binary, this sets all host bits to 1:
Example — 192.168.1.0/24:
Network: 11000000.10101000.00000001.00000000
Wildcard: 00000000.00000000.00000000.11111111
OR: 11000000.10101000.00000001.11111111 → 192.168.1.255
How to Calculate the Usable Host Range
For standard subnets (/0 through /30), the first usable host is
the network address plus 1, and the last usable host is the broadcast address minus 1.
The network and broadcast addresses are reserved and cannot be assigned to hosts.
- /24 → network
.0, broadcast.255→ usable.1–.254 - /26 → network
.0, broadcast.63→ usable.1–.62 - /30 → network
.0, broadcast.3→ usable.1–.2
The total number of addresses is 2host bits, where
host bits = 32 − prefix. The number of usable hosts is
total − 2 for /0 – /30.
Special Cases: /31 and /32
- /31 (RFC 3021): Used for point-to-point links. Both addresses are usable; there is no separate network or broadcast address. Total hosts = 2, usable hosts = 2.
- /32: A single-host route. The network and broadcast addresses are the same single address. Total hosts = 1, usable hosts = 1.
Why Use This IP Address Range Calculator?
- Complete range details: Network, broadcast, first usable, last usable, total and usable hosts.
- Masks included: Subnet mask and wildcard mask in both dotted-decimal and binary.
- Handles special prefixes: Correctly treats /31 and /32 per RFC standards.
- Validation: Rejects malformed IPs and out-of-range prefixes with clear messages.
- Free & private: Runs entirely in your browser — no data is sent to a server.
❓ IP Address Range Calculator FAQ
What is the difference between network address and broadcast address?
The network address is the first address in a subnet (all host bits set to 0) and identifies the subnet itself. The broadcast address is the last address (all host bits set to 1) and is used to send traffic to every host in the subnet. Neither can be assigned to a regular device.
How do I find the first and last usable IP addresses?
For prefixes /0 through /30, the first usable host is the network address + 1, and the last usable host is the broadcast address − 1. For /31, both addresses are usable. For /32, the single address is both the network and the usable host.
Why does a /31 have 2 usable hosts?
Per RFC 3021, a /31 subnet is designed for point-to-point links. There is no separate network or broadcast address; both addresses can be assigned to the interfaces on each end of the link. This saves address space on router-to-router connections.
Why does a /32 have only 1 usable host?
A /32 represents a single host route. The network and broadcast addresses are the same single address, and that address is the only usable host. It is commonly used for loopback interfaces and host-specific static routes.
What is a wildcard mask?
A wildcard mask is the bitwise inverse of a subnet mask. It has 1s where the subnet mask has 0s, and vice versa. Wildcard masks are used in Cisco ACLs, OSPF network statements, and other routing and security configurations.
Can I use this calculator for IPv6?
No — this tool is designed for IPv4 only. IPv4 addresses are 32 bits long and use prefixes from /0 to /32. IPv6 addresses are 128 bits long and require a different range of prefixes.
What happens if I enter an invalid IP or prefix?
The calculator will display an alert and will not produce results. Valid input requires four dot-separated decimal octets (each 0–255) and a prefix between 0 and 32. For example, 192.168.1.10/24 is valid; 192.168.1.300/24 or 192.168.1.10/33 is not.
Is this IP range calculator free?
Yes. This tool is completely free, requires no registration, and runs entirely in your browser. Your inputs are never sent to a server.