IPv4 Subnet Calculator
Network, broadcast, host range and binary working for IPv4.
Use the IPv4 Subnet Calculator tool
What this ipv4 subnet calculator does
IPv4 Subnet Calculator takes an address and a prefix length such as 192.168.1.10/24 and returns everything you need to configure or troubleshoot a subnet: the network address, broadcast address, first and last usable host, total address count, netmask, wildcard mask and the binary representation of the mask.
It also explains the arithmetic, so you can check the result by hand. The calculator understands the special cases that trip people up: /31 point-to-point links (RFC 3021), /32 host routes, and the historical classful classification of the address.
Why use it
- Configure a router interface or firewall rule with the correct network and mask.
- Confirm whether two addresses are in the same subnet before blaming routing.
- Teach or verify subnetting arithmetic with the binary view.
How to use it
- 1Enter an IPv4 address — either a bare address or CIDR notation.
- 2Enter a prefix length from 0 to 32, or choose a common prefix.
- 3Read the network, broadcast and usable range cards.
- 4Copy the subnet details for your ticket or configuration.
Worked examples
Typical /24 LAN
Input
192.168.1.10/24
Output
Network 192.168.1.0 · Broadcast 192.168.1.255 · Hosts 192.168.1.1 – 192.168.1.254 · 254 usable · Mask 255.255.255.0
A /20 is not a /24
Input
10.0.0.0/20
Output
Network 10.0.0.0 · Broadcast 10.0.15.255 · Hosts 10.0.0.1 – 10.0.15.254 · 4,094 usable · Mask 255.255.240.0
A /20 spans 16 /24 blocks, which is why the third octet changes in the usable range.
Common mistakes
- Assigning the network or broadcast address to a host — both are reserved (except on /31 and /32).
- Assuming every private range is /24. A /16 private network has 65,534 usable addresses.
- Forgetting that the first and last addresses are unusable, so a /24 provides 254 hosts, not 256.
Frequently asked questions
How many usable hosts does a subnet have?
What is a wildcard mask?
Are private addresses included?
Does this tool contact my network?
Related tools
All toolsCIDR Calculator
Test IP membership and summarise multiple CIDR blocks.
IPv6 Subnet Calculator
IPv6 prefix maths with correct 128-bit address counts.
IP Address Validator
Validate and classify IPv4 and IPv6 addresses.
DNS Lookup
Query DNS records over DoH with multiple record types.