IP Subnet Calculator
Calculate the network address, broadcast address and usable host range for a CIDR block.
Last updated · View algorithm, constants and default inputs (JSON)
About this calculator
This standard IPv4 subnet calculator validates each octet and prefix. Ordinary subnets reserve network and broadcast addresses; on point-to-point /31 links both addresses are usable, and /32 represents one host route.
Worked example
calculated with the default values below
First octet 192 · Second octet 168 · Third octet 1 · Fourth octet 10 · CIDR prefix 24 / Subnet mask 255.255.255.0 · Network address 192.168.1.0 · Broadcast address 192.168.1.255 · First usable host 192.168.1.1 · Last usable host 192.168.1.254 · Total addresses 256 · Usable hosts 254 · Wildcard mask 0.0.0.255
General background references
Disclaimer
These calculators give general date results. Public holidays, working-day conventions and time-zone rules are set locally and change, so confirm against the official calendar for anything legally or contractually binding.
Implementation source
This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.
Formula and variables
usable = 2^(32−p)−2 normally; /31 point-to-point = 2; /32 host route = 1
- N
- Usable host addresses
- p
- Prefix length / CIDR (0–32)
- IP
- IPv4 address
- mask
- Subnet mask
- network
- Network address
- broadcast
- Broadcast address
Conventional prefixes reserve network/broadcast; /31 point-to-point has 2 usable endpoints and /32 is one host route.
Frequently asked questions
Why does the standard host count exclude two addresses?
In ordinary IPv4 subnets, the network and broadcast addresses are reserved. RFC 3021 allows both /31 addresses as endpoints on point-to-point links; /32 represents a single host route.