Subnet Calculator (IPv4 / CIDR)
The network 192.168.1.0/24 contains 256 addresses — network .0, broadcast .255, and 254 usable hosts from .1 to .254 under mask 255.255.255.0.
How it works
Enter any IPv4 address and a prefix length and get the full map of its subnet: the network address it belongs to, the broadcast address, the dotted subnet mask, and exactly which addresses hosts may use. Enter a host address rather than the network address and it still works — the network is derived, which is the entire point of the tool.
The counts follow the classic convention most networks still teach and use: the first address names the network, the last is broadcast, and everything between is assignable. The /31 and /32 cases are flagged on the panel rather than reported as nonsense negative hosts.
The method
The address is treated as a 32-bit number. Mask = the top CIDR bits set. Network = address AND mask; broadcast = network OR the inverted mask. Total addresses = 2^(32−CIDR); usable = total − 2 (except /31 and /32, where the panel explains the point-to-point convention).
Frequently asked questions
What does /24 mean?
The first 24 of the address's 32 bits name the network; the remaining 8 bits vary per host, giving 2^8 = 256 addresses. Smaller second number, bigger network: /16 holds 65,536.
Why are two addresses unusable?
The all-zeros host part is the network's own name, and the all-ones host part is the broadcast address every host listens to. Neither can belong to a single machine, leaving total − 2.
Is a /30 good for linking two routers?
Yes — /30 gives exactly 2 usable addresses, the classic point-to-point link size. /31 is also used for this on modern gear, which is why the calculator calls it out.