Type an IPv4 address with a prefix such as 192.168.1.10/24, or an address and a dotted mask such as 10.0.5.7 255.255.252.0, and the subnet calculator shows everything about that network: the network and broadcast addresses, the first and last usable host, the number of usable hosts, the subnet mask, the wildcard mask used in Cisco ACLs and OSPF, the IP class and whether the address is private or public.
Open the binary view to see exactly which bits belong to the network and which to the host, and use the CIDR reference table to compare prefix lengths from /8 to /32. Useful for network engineers, students preparing for CCNA or Network+, and anyone setting up a router, VPN or cloud VPC.
How to use the Subnet Calculator tool
- Type an IP address with
/prefix, or with a subnet mask after a space. - Or type just the IP and choose the mask from the list.
- Read the network, broadcast, host range and host count.
- Open Binary view to see the network bits highlighted.
Why use ToolOrca Subnet Calculator
- CIDR or dotted subnet mask input
- Network, broadcast and usable host range
- Wildcard mask for ACLs
- Private, public, loopback and CGNAT detection
- Binary view with network bits highlighted
- Handles /31 and /32 correctly
How subnetting works
An IPv4 address has 32 bits. The prefix length (the number after the slash) says how many of those bits identify the network; the rest identify hosts. A /24 leaves 8 host bits, so the subnet has 2⁸ = 256 addresses. The first (all host bits 0) is the network address and the last (all host bits 1) is the broadcast address, leaving 254 usable hosts.
The general formula is usable hosts = 2(32 − prefix) − 2. Exceptions: a /31 has two usable addresses on point-to-point links (RFC 3021), and a /32 is a single host route.
Private IP address ranges
RFC 1918 reserves three ranges for private networks that are not routed on the internet: 10.0.0.0/8, 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16. 100.64.0.0/10 is used by internet providers for carrier-grade NAT, 127.0.0.0/8 is loopback and 169.254.0.0/16 is assigned automatically when DHCP fails.
Frequently asked questions
How many hosts are in a /24 subnet?
256 addresses, of which 254 are usable hosts. A /25 has 126 usable hosts, a /26 has 62, a /27 has 30, a /28 has 14, a /29 has 6 and a /30 has 2.
What is the subnet mask for /24?
255.255.255.0. A /16 is 255.255.0.0, a /20 is 255.255.240.0 and a /28 is 255.255.255.240.
What is a wildcard mask?
The inverse of the subnet mask: each bit is flipped. For 255.255.255.0 it is 0.0.0.255. Cisco access lists and OSPF network statements use wildcard masks.
Does it support IPv6?
Not yet. This calculator handles IPv4 addresses only.
Is my IP address sent anywhere?
No. All calculations run in your browser.