LightAtom

Subnet Calculator

Enter an IPv4 address with a prefix or subnet mask and get the network and broadcast addresses, the usable host range, the masks, and an optional split into smaller subnets.

Try: , ,

Network address
192.168.1.0
Broadcast address
192.168.1.255
Usable host range
192.168.1.1 – 192.168.1.254
Usable hosts
254
Total addresses
256
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
CIDR notation
192.168.1.0/24
Binary mask
11111111.11111111.11111111.00000000
IP class
C
Type
Private (RFC 1918)

How to use it

  1. Type an IPv4 address followed by a prefix (192.168.1.10/24) or a space and a subnet mask (192.168.1.10 255.255.255.0).
  2. Read the result as you type: network address, broadcast address, usable range, host count, masks and the address class.
  3. To divide the network, pick a smaller prefix under “Split into” and the calculator lists every resulting subnet.

What the result means

  • Network address is the first address of the subnet. It identifies the network itself and isn't given to a device.
  • Broadcast address is the last address. A packet sent there reaches every device on the subnet. /31 and /32 have none.
  • Usable host range is everything in between: the addresses you can assign to computers, phones and printers.
  • Usable hosts is the size of that range: total addresses minus two (network and broadcast).
  • Subnet mask shows the network part as 255s; wildcard mask is its inverse, used in router ACLs and OSPF.
  • IP class (A, B, C) is the pre-1993 classful size. Modern networks ignore it, but exams still ask for it.
  • Private means the address is in an RFC 1918 range (10/8, 172.16/12, 192.168/16) and isn't routed on the internet.

Everything runs in your browser; nothing is sent anywhere. Add ?q=10.0.0.1/20 to the page address to share a result.

Frequently asked questions

How do I calculate a subnet?

Write the mask in binary, then AND it with the IP address: that gives the network address. Set all host bits to 1 for the broadcast address. Usable hosts are 2^(32 − prefix) − 2. The calculator does each step instantly, and the subnetting practice tool shows the shortcut by hand.

What is the subnet mask for /24?

255.255.255.0. A /24 fixes the first 24 bits (three octets), leaving 8 bits for hosts: 256 addresses, 254 usable. It's the size almost every home network uses, such as 192.168.1.0/24.

How many hosts are in a /27?

32 addresses, 30 usable. A /27 leaves 5 host bits (2^5 = 32), minus the network and broadcast addresses. Its mask is 255.255.255.224, and subnets start every 32 addresses: .0, .32, .64 and so on.

What is a wildcard mask?

The inverse of the subnet mask: subtract each octet from 255. For 255.255.255.0 it's 0.0.0.255. Cisco access lists and OSPF use wildcard masks to say which bits must match (0) and which can be anything (1).

Can I enter a subnet mask instead of a prefix?

Yes. Type the address, a space, then the mask, for example 10.0.0.1 255.255.240.0. The calculator converts it to /20. Masks must be contiguous ones followed by zeros; anything else isn't a valid subnet mask.

Does the calculator handle /31 and /32?

Yes. A /31 has two usable addresses with no network or broadcast address (RFC 3021, used on point-to-point links). A /32 is a single host, as used in firewall rules and routing tables.

LightAtom team

The people who build LightAtom, a network monitor for macOS.