IP Subnet Calculator
Calculate network, broadcast, mask and usable hosts from any IPv4 CIDR.
The IP Subnet Calculator takes any IPv4 CIDR — like 192.168.1.0/24 or 10.0.0.0/8 — and returns the network address, subnet mask, broadcast address, first and last usable hosts, and the number of usable addresses.
Subnetting is pure bit math: the prefix length tells you how many leading bits are fixed (the network part), and everything else is host space. A /24 has 254 usable addresses (256 minus network and broadcast), a /16 has 65,534 — the calculator shows exactly what your CIDR gives you for planning VLANs, VPCs and container networks.
Special cases are handled honestly: /31 and /32 prefixes (point-to-point links) do not use the two-address overhead, and the tool says so instead of subtracting addresses that are not reserved. Runs entirely in your browser.
Network address
192.168.1.0
/24 · class C
Subnet mask
255.255.255.0
prefix /24
Broadcast address
192.168.1.255
Usable hosts
254
excluding network & broadcast
First usable host
192.168.1.1
Last usable host
192.168.1.254
A /24 gives 254 usable addresses (256 minus network and broadcast), /16 gives 65,534, and /8 over 16 million. Prefixes /31 and /32 are special point-to-point cases without the usual two-address overhead.
How to use the IP Subnet Calculator
- Enter an IPv4 CIDR like 192.168.1.0/24.
- Read the network and broadcast addresses.
- Check the subnet mask in dotted form.
- See the first and last usable host.
- Use the host count to size your network plan.
Frequently asked questions
How many addresses are in a /24?
256 total (2³²⁻²⁴), of which 254 are usable — the network address (…0) and broadcast (…255) are reserved. The calculator applies this logic at every prefix.
What is CIDR?
Classless Inter-Domain Routing — the /n notation that replaced classful A/B/C addressing. It states exactly how many bits identify the network, enabling efficient address allocation.
Why do /31 and /32 behave differently?
RFC 3021 allows /31 point-to-point links to use both addresses (no broadcast), and a /32 is a single-host route. The calculator skips the network/broadcast subtraction for these prefixes.
Related tools
View all developer tools →JSON Formatter & Validator
Format, minify and validate JSON instantly with clear error messages that point at the exact problem.
Dev ToolsJSON Validator
Check if your JSON is valid and find syntax errors with exact line and column.
Dev ToolsJSON Minifier
Compress JSON to its smallest valid form for storage and transport.
Dev ToolsJSON to CSV
Convert a JSON array of objects into a clean CSV file in one click.
Dev ToolsCSV to JSON
Convert CSV (from Excel or Google Sheets) into a JSON array of objects.
Dev ToolsBase64 Encoder
Encode text or files to Base64 — standard or URL-safe — in your browser.