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.

/ n
—

Everything is worked out in your browser — your text and numbers are never uploaded anywhere.

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).

Check important dates twice. Every result here is worked out from the values you enter and the calendar, clock and counting conventions described on the page. Date and time answers can depend on time zones and daylight-saving rules, and counting tools follow the definitions printed with them. For deadlines, filings, payroll or anything with money attached, confirm the figure against an authoritative source.

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.

Embed this tool

Put this tool on your own site for free — copy the code below. It runs entirely in the visitor's browser, like it does here.

<iframe src="https://calcwhen.com/embed/subnet-calculator/" width="100%" height="520" style="border:1px solid #d9d5f2;border-radius:12px" loading="lazy" title="Subnet Calculator — CalcWhen"></iframe>

Tool by CalcWhen — please keep the credit link so others can find the original.