🌐 Subnet / CIDR Calculator -- IPv4 Network Tool, Free & Offline
Enter any IPv4 address and CIDR prefix (such as 192.168.1.10/24) or subnet mask and this calculator instantly shows the network address, broadcast address, first and last usable hosts, subnet mask, wildcard mask, total addresses, usable host count, and IP class -- all computed in pure JavaScript with no data sent to any server.
| Network Address | — | |
| Broadcast Address | — | |
| First Usable Host | — | |
| Last Usable Host | — | |
| Subnet Mask | — | |
| Wildcard Mask | — | |
| CIDR Notation | — | |
| Total Addresses | — | |
| Usable Hosts | — | |
| IP Class | — |
About
This subnet calculator applies bitwise arithmetic on IPv4 addresses to derive every property of a subnet from a single CIDR block. You can enter the prefix as a plain number (24), with a slash (/24), or as a full dotted-decimal subnet mask (255.255.255.0) -- the tool accepts all three. Edge cases /31 (RFC 3021 point-to-point links) and /32 (host routes) are handled correctly: /31 reports two usable hosts and no broadcast; /32 reports a single host address. IP class (A through E, plus loopback and private range notes) is derived from the first octet. Because everything runs client-side in your browser with zero network requests, your IP addresses and network plans remain entirely private.
How to use
- Type your IPv4 address (e.g. 192.168.1.10) in the IP Address field.
- Enter the CIDR prefix (e.g. 24 or /24) or subnet mask (e.g. 255.255.255.0) in the second field.
- Click Calculate to instantly see all subnet details in the results table.
- Review network address, broadcast, host range, masks, total and usable hosts, and IP class.
- Click the Copy button next to any result to copy that value to your clipboard.
FAQ
- What is a CIDR prefix and how does it relate to a subnet mask?
- A CIDR prefix (e.g. /24) is just a shorthand for the number of consecutive 1-bits in the subnet mask. /24 equals 255.255.255.0 because the first 24 bits are 1 and the remaining 8 are 0. Both notations describe the same network boundary.
- How does this tool handle /31 and /32 networks?
- For /31 networks (RFC 3021), both addresses are treated as usable host addresses for point-to-point links with no broadcast address. For /32, the address is a single-host route with no network, broadcast, or range -- only one address exists.
- Does this tool send my IP address to a server?
- No. All calculations are performed locally in your browser using pure JavaScript. No data you enter is ever sent to any server. Your network addresses and topology remain entirely private.
- What is the wildcard mask and when do I use it?
- The wildcard mask is the bitwise inverse of the subnet mask (each 0 becomes 1 and vice versa). It is commonly used in Cisco ACLs and OSPF configurations to specify which bits of an address must match. For /24 the wildcard mask is 0.0.0.255.
- How many usable hosts are in a /24, /16, or /8 subnet?
- A /24 has 256 total addresses and 254 usable hosts (subtract network and broadcast). A /16 has 65,536 total and 65,534 usable. A /8 has 16,777,216 total and 16,777,214 usable. The formula is 2^(32-prefix) - 2 for prefixes smaller than /31.