Networking
IP Subnet Calculator
Network address, broadcast, usable host range, and host count for an IPv4 address and prefix, with the notes that matter on a control network.
Calculated reference results
- Network address
- 192.168.10.0
- Broadcast address
- 192.168.10.255
- Subnet mask
- 255.255.255.0
- Wildcard mask
- 0.0.0.255
- Usable host range
- 192.168.10.1 to 192.168.10.254
- Usable hosts
- 254
- CIDR notation
- 192.168.10.0/24
- Address type
- Private (RFC 1918)
- Address is the network or broadcast
- Usable host address
256 total addresses
The arithmetic
- Address 192.168.10.45 as 32 bits: 11000000.10101000.00001010.00101101
- Mask /24: 11111111.11111111.11111111.00000000
- Network = address AND mask = 192.168.10.0
- Broadcast = network OR inverted mask = 192.168.10.255
- Host bits = 32 - 24 = 8, giving 256 addresses
What this does not account for
- A device answering on a 169.254 address did not get a DHCP lease. On a control network that usually means a static address was expected and never configured.
- Two devices with the same address produce intermittent, confusing symptoms on both. Check for ARP conflict messages before chasing anything else.
- Sizing a subnet generously is cheap; renumbering a live control network is not. Leave room for the devices that will be added later.
How this is calculated
An IPv4 subnet is defined by an address and a prefix length. The prefix marks the network bits; the remaining bits address hosts. A /24 has 8 host bits, giving 256 addresses, of which 254 are usable because the all-zeros address identifies the network and the all-ones address is the broadcast.
Assumptions and limitations built into this calculator
- IPv4 with classless addressing.
- Assumes the network and broadcast addresses are not usable for hosts, which holds on ordinary equipment.
Frequently asked questions
- How many hosts fit in a /24?
- 254. There are 256 addresses, and the first is the network address while the last is the broadcast address.
- What does a 169.254 address mean?
- The device asked for a DHCP lease, did not get one, and assigned itself a link-local address. It will not communicate with anything on the intended subnet.
Direct contact
Have a controls question?
Reach Eric Sullivan directly about anything on this site, a controls or automation topic, or one of his personal projects.