IPv4 subnet calculator
Enter an IP address and a CIDR prefix to get every parameter of the subnet, from the network address to the host count.
For example 192.168.1.10 or 192.168.1.10/24
- Network address
- Broadcast address
- Subnet mask
- Wildcard mask
- First host
- Last host
- Usable hosts
- Total addresses
- CIDR notation
Runs in your browser. Nothing you enter is sent to our server.
About this tool
A subnet is a block of consecutive IPv4 addresses that share the same leading bits. The prefix says how many: in a /24 the first 24 bits are the network and the remaining 8 identify hosts, giving 256 addresses.
The calculator shows everything you need to configure a router, server or ACL: the subnet mask and wildcard mask (used in Cisco ACLs and OSPF), the range boundaries and the number of addresses available for devices.
How to use
- Enter any IP address from the subnet, for example
10.20.30.40. - Choose the prefix. Pasting
10.20.30.40/22sets the prefix automatically. - Copy the values you need from the result.
Examples
10.20.30.40/22
Network 10.20.28.0, broadcast 10.20.31.255, mask 255.255.252.0, wildcard 0.0.3.255, 1022 hosts
192.168.0.130/26
Network 192.168.0.128, hosts 192.168.0.129–192.168.0.190 (62), broadcast 192.168.0.191
Frequently asked questions
What is a wildcard mask?
It is the subnet mask inverted: ones where the mask has zeros. For /24 the mask is 255.255.255.0 and the wildcard is 0.0.0.255.
Why does /31 have two hosts and no broadcast?
RFC 3021 defines /31 for point-to-point links: both addresses are assigned to devices and no broadcast address is needed.
How do I pick a subnet size?
Count your devices, add headroom and choose the smallest prefix whose usable host count covers it. For 50 devices a /26 (62 hosts) works.