Enter an IP address with a prefix (192.168.1.10/24) or a netmask (192.168.1.10 255.255.255.0). You get the network and broadcast address, the usable host range, the number of hosts, the wildcard mask and whether the address is private or public. The calculation runs in your browser.
Examples: 192.168.1.10/24, 10.0.0.5 255.255.0.0, 172.16.4.1/20
How subnetting works in one minute
The prefix says how many of the 32 bits of an IPv4 address belong to the network. A /24 keeps 24 bits for the network and leaves 8 bits, which is 256 addresses. The first address is the network itself and the last is the broadcast address, so 254 can be given to devices. Each extra bit in the prefix halves the block: a /25 has 128 addresses, a /26 has 64.
Questions
How many usable hosts are in a /24?
A /24 has 256 addresses. The first is the network address and the last is the broadcast address, which leaves 254 usable host addresses.
Why do /31 and /32 show no network or broadcast address?
A /32 is a single host address. A /31 is used for point-to-point links (RFC 3021), where both addresses are usable and there is no broadcast address.
What is a wildcard mask?
The inverse of the subnet mask: 255.255.255.0 becomes 0.0.0.255. Cisco access lists and some firewalls use wildcard masks instead of subnet masks.
Which IP ranges are private?
10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are private (RFC 1918). 100.64.0.0/10 is shared carrier-grade NAT space, 127.0.0.0/8 is loopback and 169.254.0.0/16 is link-local.
Can I calculate subnets on Linux?
Yes. On Debian or Ubuntu install the ipcalc package (sudo apt install ipcalc) and run ipcalc 192.168.1.10/24. The ip -4 addr command shows the prefix of every interface on your machine.
Next step: set a static IP address on Debian, find your IP address, or browse all free tools.