Addressing
IPv4 subnet calculator — hosts, mask and broadcast
Calculate the network address, broadcast, host range and mask from IPv4/CIDR. Explore examples and /31 and /32 exceptions. No sign-up.
New to this tool? Start here.
Click an example below the form. Look at the result, then change one value to compare what happens.
- IP address
- A number assigned to a device or its network connection, such as 192.168.1.10.
- Prefix, e.g. /24
- Tells us which part of the address identifies the network. A larger number after the slash means a smaller group of addresses.
- Broadcast
- An address for sending to all devices in an IPv4 subnet. It is not assigned to an ordinary device.
01 / Input
Start with your data
Your data is processed in the browser. Sharing a result is your choice.
02 / Your result
A result you can understand.
Fill in the form or choose an example. You will see the values and how they were calculated.
02 / Your result
Step by step
How did we get here?
How to use it
Enter an address with a prefix, or set the prefix separately. A /31 represents two point-to-point endpoints; a /32 is a single address.
A little network lab
Are these two computers in the same subnet?
A computer uses 192.168.1.70/26. You want to know whether 192.168.1.120 and 192.168.1.130 belong to its subnet. Matching the first three numbers is not enough.
32 − 26 leaves 6 host bits, so each block has 2⁶ = 64 addresses. Last-octet boundaries are 0, 64, 128 and 192.
70 falls between 64 and 127. The network address is 192.168.1.64, broadcast is .127 and usable hosts run from .65 to .126.
Address .120 is in the subnet; .130 is in 192.168.1.128/26. Communication between these subnets requires routing.
Your turn
Which subnet contains 192.168.1.190/26?
Show answer and explanation
192.168.1.128/26. Hosts: .129–.190; broadcast: .191. Address .190 is the last usable host in this block.
Official documents
Standards & sources
Sources checked:
- CIDR addressing and route aggregation rules (RFC 4632 / BCP 122)
- Two-address /31 point-to-point networks (RFC 3021)
- Current purposes of special IPv4 ranges (IANA registry)
The date refers to checking the listed documents and registries, not endorsement by their authors. Calculation assumptions and limits appear with the result. How we prepare the material.