Subnet Calculator
Derive network, broadcast, host range and masks from CIDR notation — IPv4 and IPv6, all in your browser.
IPv4 CIDR
Subnet details
Bit map
About this tool
Subnetting turns a single IP block into the network address, broadcast address, usable host range and masks your routers, firewalls and DHCP scopes actually need. Getting a CIDR prefix wrong by one bit silently changes all of those values, so this calculator does the bit math for you: enter an address in CIDR notation and read every derived value at a glance.
It handles the tricky edge cases correctly — a /31 point-to-point link has two usable addresses per RFC 3021, and a /32 is a single host route — and shows a colour-coded 32-bit map so you can see exactly where the network portion ends and the host portion begins. An IPv6 mode summarizes a prefix's compressed and expanded forms and the total number of addresses in the block. Everything is computed locally; no address you enter is uploaded.
How to use
Enter a CIDR block
Type an IPv4 address with a prefix, e.g. 192.168.1.0/24, or switch to IPv6 mode for a prefix like 2001:db8::/32.
Read the subnet details
See the network and broadcast addresses, usable host range, subnet mask, wildcard mask and host counts instantly.
Inspect the bit map
Use the coloured 32-bit map to see how many bits belong to the network vs. the host portion.
Copy any value
Copy the network, mask or host range to paste into router configs, ACLs or documentation.
What it derives
| Value | Meaning |
|---|---|
| Network address | The first address of the block — identifies the subnet |
| Broadcast address | The last address — reaches every host on the subnet (IPv4) |
| Usable host range | First to last assignable host address |
| Subnet mask | Dotted-decimal mask for the prefix (e.g. 255.255.255.0) |
| Wildcard mask | Inverse mask used by ACLs and OSPF |
| Usable hosts | Host count, with RFC 3021 (/31) and /32 handled correctly |
IPv4 and IPv6 supported — all math runs in your browser.
Frequently asked questions
Related tools
Programmer Calculator
Multi-base calculator with simultaneous binary, octal, decimal and hex views, bitwise AND/OR/XOR/NOT/shift operations, and IEEE 754 float inspection
Database Connection String Builder
Build and URL-encode connection strings for PostgreSQL, MySQL, MongoDB, Redis and SQLite from a simple form — with JDBC and key/value variants
Docker Compose Builder
Build a valid docker-compose.yml from a visual form — services, images, ports, volumes, environment variables, restart policies and dependencies
NGINX Config Builder
Generate an NGINX server config from a visual form — reverse proxy, static hosting, SPA fallback, SSL termination and HTTP-to-HTTPS redirects
Regex Explainer
Break down a regular expression into a plain-English, token-by-token explanation with a live match preview and a library of common patterns