loot.tools

IP Subnet Calculator

Plug in an IPv4 address in CIDR notation (192.168.1.0/24), with a dotted subnet mask, or on its own, and get the network and broadcast addresses, the usable host range, host counts, the subnet and wildcard masks, the address class, and whether the block is private or public. The /31 point-to-point and /32 single-host edge cases are handled the way real networks treat them.

Work out the network and broadcast addresses, usable host range, subnet mask, and wildcard for any IPv4 block. Enter an address in CIDR notation (192.168.1.0/24), with a dotted mask, or on its own to use the classful default.

192.168.1.0/24PrivateClass C
Network
192.168.1.0
Broadcast
192.168.1.255
First host
192.168.1.1
Last host
192.168.1.254
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Total addresses
256
Usable hosts
254
Mask in binary
11111111.11111111.11111111.00000000

What it works out

Give it an address and a prefix, and it splits the 32 bits into the network and host parts. The network address is the first address in the block, the broadcast is the last, and everything between them is usable for hosts. It also shows the subnet mask, its inverse (the wildcard mask used in ACLs), the total and usable address counts, the classful letter, and the scope so you can tell a private 10.x block from a public one at a glance.

How to enter a subnet

The usual form is an address plus a slash and a prefix length, like 10.0.0.0/8. You can also write the mask out in full, like 192.168.1.10/255.255.255.0, and it converts to the prefix for you. Leave the prefix off entirely and it falls back to the classful default (/8 for class A, /16 for B, /24 for C). Every result has a copy button.

The edge cases it gets right

  • A /31 is treated as an RFC 3021 point-to-point link, so both addresses count as usable and there's no wasted broadcast
  • A /32 is a single host, useful for firewall rules and routes
  • A /0 covers the whole IPv4 space
  • Everything runs in your browser, so no address you type is sent anywhere