Enter an IPv4 address and a subnet mask (CIDR notation) to get the full picture: network address, broadcast address, usable host range, mask, wildcard, and binary breakdown. Everything runs in your browser.
IPv4 Subnet Calculator
Need a specific number of hosts?
Enter how many usable hosts you need and get the smallest subnet mask that fits.
How to use the subnet calculator
Type any IPv4 address and drag the CIDR slider (or tap one of the quick-mask chips) to see every subnet detail update live. The calculator returns the network address, broadcast address, dotted-decimal subnet mask, wildcard mask, the usable host range, and the address count — plus a binary view so you can see exactly which bits belong to the network and which to the hosts.
What is subnetting?
Subnetting is the practice of dividing a larger IP network into smaller logical networks. An IPv4 address is 32 bits: a subnet mask (written in CIDR notation, like /24) says how many of those leading bits identify the network. The remaining bits identify individual hosts inside that network.
For example, 192.168.1.130/26 has 26 network bits and 6 host bits. That gives 64 total addresses, of which 62 are usable for hosts — one is reserved as the network address (the first) and one as the broadcast address (the last).
The formulas, if you want them
A worked example: splitting a /24 into four /26s
Say you have 192.168.10.0/24 and you want to separate servers, printers, Wi-Fi clients, and guest devices so a compromise in one group can’t touch the others. Each /26 gives you 64 addresses with 62 usable hosts — more than enough per group. The four blocks fall on fixed boundaries: 192.168.10.0/26 (usable .1 through .62), 192.168.10.64/26 (.65 through .126), 192.168.10.128/26 (.129 through .190), and 192.168.10.192/26 (.193 through .254). Type any of those into the calculator and you can verify every boundary. Notice what you did NOT get to choose: a /26 must land on a multiple of 64. That alignment rule is the one thing most people get wrong when planning by hand — and the reason the calculator shows the network address instead of just trusting your input.
Common subnetting mistakes (and the ten-second checks)
Subnet calculator FAQ
How many usable hosts are in a /26, /27, or /28? 62, 30, and 14 — the pattern is always 2 to the host bits minus 2 (or minus nothing on /31 and /32 links). The calculator’s host-count tile shows it for any mask.
What’s the difference between /24 and 255.255.255.0? None — they’re the same mask written two ways. CIDR notation counts the one-bits; dotted decimal spells them out. The binary view in the calculator shows both describing the same thing.
What’s the biggest and smallest subnet I can make? /0 is the entire IPv4 internet (one block, no boundaries); /32 is a single address, used for host routes and loopbacks. Everything real lives between those.
Does this work for public IPs or just private ranges? Both — the math is identical. Only the RFC 1918 ranges (10/8, 172.16/12, 192.168/16) are reserved for private use; the calculator doesn’t care which you enter.
Like every tool on this site, the subnet calculator runs entirely in your browser. Your input is never sent anywhere or stored anywhere.