IPv4 Subnet Calculator
Enter an IPv4 address in CIDR notation to see the network and broadcast addresses, subnet mask, wildcard mask, usable host range and total host count. Everything is computed in your browser.
How to use the subnet calculator
- Type an IPv4 address with a prefix, for example 192.168.1.0/24.
- Read the results table for network, broadcast, mask and host range.
- Adjust the prefix to widen or narrow the subnet and recompute instantly.
Examples
A /24 home network
192.168.1.0/24
Network 192.168.1.0, broadcast 192.168.1.255, mask 255.255.255.0, 254 usable hosts (.1 to .254).
A /30 point-to-point link
192.168.1.10/30
Network 192.168.1.8, broadcast 192.168.1.11, 2 usable hosts (.9 and .10).
Frequently asked questions
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) writes an address and prefix length together, like 192.168.1.0/24. The /24 means the first 24 bits are the network portion and the remaining 8 bits address hosts.
What is the difference between the network and broadcast address?
The network address is the first address in the block, with all host bits set to 0, and identifies the subnet itself. The broadcast address is the last address, with all host bits set to 1, and reaches every host on the subnet. Neither is normally assigned to a device.
Why are usable hosts two fewer than the total?
For a /30 or larger block, the network and broadcast addresses are reserved, so usable hosts equals total addresses minus 2. A /31 has 2 usable addresses for point-to-point links (RFC 3021), and a /32 describes a single host.
What is the difference between a subnet mask and a wildcard mask?
A subnet mask marks network bits with 1s, like 255.255.255.0 for a /24. A wildcard mask is its bit-for-bit inverse, like 0.0.0.255, and is used in access control lists and routing rules to match the host bits.
Does this work for private and public addresses?
Yes. The math is the same for any IPv4 address, whether it is in a private range such as 10.0.0.0/8 or a public one. The class label (A to E) is the historical classful class based on the first octet.
Is my input sent to a server?
No. All calculations run locally in your browser using 32-bit integer math, so the addresses you enter never leave your device.
Related tools
Chmod Calculator
Convert Unix file permissions between octal (755), symbolic (rwxr-xr-x) and a checkbox grid. Get the chmod command instantly, all in your browser.
User Agent Parser
Parse any User-Agent string into browser, OS and device. Paste a UA or use your own to see name, version and device type. Runs in your browser.
.env to JSON
Convert a .env file to JSON, or JSON back to .env. Parses KEY=value lines, comments, quotes and export. Runs entirely in your browser.
Aspect Ratio Calculator
Calculate aspect ratios fast. Enter a ratio like 16:9 and one dimension to get the other, or enter width and height to simplify the ratio.
Base58 Encoder
Encode and decode Base58 online with the Bitcoin alphabet. Convert text to Base58 or back, UTF-8 safe, no confusing 0 O I l. Runs in your browser.
Base64 Decode
Decode Base64 to plain text online. Paste a Base64 or base64url string and get instant UTF-8 output. Free, fast and runs in your browser.