Free IPv4 and IPv6 subnet calculator
Calculate IPv4 and IPv6 network prefixes, address ranges, masks, host bits, and adjacent subnets privately in your browser.
- Format
- Free browser tool
- Updated
- Updated
Calculated on this device
Calculate an IPv4 or IPv6 subnet
Planning a LAN, VPS network, or IPv6 allocation? Enter an address and CIDR prefix to see the complete network range and practical details.
No account · No API · No address stored
Calculated IPv4 network
Subnet results
- Network in CIDR notation
- —
- Subnet mask
- —
- Wildcard mask
- —
- Address use
- —
- Entered address
- —
- Network address
- —
- Broadcast address
- —
- Total addresses
- —
- First usable host
- —
- Last usable host
- —
- Usable host addresses
- —
- Complete address range
- —
- Previous subnet
- —
- Next subnet
- —
Show the binary calculation
The prefix marks the network bits on the left. The remaining bits identify addresses inside that network.
- IPv4 address
- —
- Subnet mask
- —
- Network address
- —
How to use the IPv4 and IPv6 subnet calculator
- Enter an IPv4 or IPv6 address and CIDR prefix, such as
192.168.1.10/24or2001:db8::42/64. - The calculator recognizes the address family automatically. IPv4 prefixes run from
/0through/32; IPv6 prefixes run from/0through/128. - Select “Calculate subnet” to see the network prefix, mask, address range, address type, and adjacent equally sized networks.
- Use “Copy results” when you need a plain-text summary for a ticket, configuration note, or change plan.
The calculator accepts unambiguous dotted-decimal IPv4 plus compressed, expanded, and IPv4-embedded IPv6 notation. IPv6 results are normalized to the concise lowercase form recommended by RFC 5952. Interface-specific zone IDs such as %eth0 are intentionally excluded because they do not change the numeric subnet.
Everything runs locally in the browser; no address, result, or network plan is sent to Bitfoo or added to the page URL.
What the subnet calculator results mean
CIDR notation combines an address with a prefix length. In 192.168.1.0/24, the first 24 of IPv4's 32 bits identify the network. In 2001:db8::/64, the first 64 of IPv6's 128 bits identify the network prefix. IPv4 classless prefix notation is defined in RFC 4632, while IPv6 address and prefix notation is defined in RFC 4291.
| Result | Meaning | Common use |
|---|---|---|
| Network address | The first address in the calculated block | Routing tables, firewall rules, and network documentation |
| Subnet mask | The dotted-decimal form of the CIDR prefix | Interface and legacy network configuration |
| Wildcard mask | The bitwise inverse of the subnet mask | Access-control lists and address matching on some platforms |
| Broadcast address | The final address in a conventional /0 through /30 subnet | Directed broadcast within IPv4 networks that support it |
| Usable host range | The addresses between the conventional network and broadcast addresses | Planning interface, server, and device assignments |
| Adjacent subnets | The equally sized networks immediately before and after this block | Checking boundaries while dividing or documenting address space |
| IPv6 prefix mask | The 128-bit prefix shown in hexadecimal rather than an IPv4 dotted-decimal mask | Confirming which IPv6 bits identify the network |
| IPv6 address type | Recognition of common global, unique-local, link-local, multicast, documentation, transition, and special-purpose addresses | Understanding an address's intended scope or use |
The mathematical address range does not prove that every address is assignable in a particular cloud, hosting, or network platform. Providers may reserve addresses for gateways, DNS, platform services, subnet-router anycast, or other infrastructure.
Common IPv4 CIDR prefixes and subnet masks
A larger prefix leaves fewer host bits and therefore creates a smaller subnet. The conventional usable-host count below subtracts the network and broadcast addresses through /30; /31 and /32 use their modern special-case behavior.
| Prefix | Subnet mask | Total addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /12 | 255.240.0.0 | 1,048,576 | 1,048,574 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 on a point-to-point link |
| /32 | 255.255.255.255 | 1 | 1 host route |
Common IPv6 prefixes and what they mean
IPv6 addresses contain 128 bits and use CIDR prefix lengths directly. There is no IPv6 broadcast address; multicast replaces broadcast behavior. The calculator therefore reports the complete prefix range instead of subtracting a network and broadcast address. These fundamentals come from the IPv6 Addressing Architecture in RFC 4291.
| Prefix | Host bits | Common context |
|---|---|---|
| /32 | 96 | A common size for an ISP or larger network allocation; assignment policy varies |
| /48 | 80 | A common site allocation that can contain 65,536 separate /64 networks |
| /56 | 72 | A common smaller-site or residential delegation that can contain 256 /64 networks |
| /64 | 64 | The standard subnet size for most IPv6 LANs and stateless address autoconfiguration |
| /96 | 32 | Used by some IPv4/IPv6 translation and embedded-address mechanisms |
| /127 | 1 | Two addresses for an inter-router point-to-point link under RFC 6164 |
| /128 | 0 | One exact IPv6 address, commonly represented as a host route |
The “Address use” result recognizes common assignments in the current IANA IPv6 Special-Purpose Address Registry, including documentation, unique-local, link-local, loopback, multicast, translation, benchmarking, and transition ranges. A classification describes the address itself; it does not test live reachability or confirm a provider's routing policy.
Why IPv4 /31 and /32 subnets are different
A traditional host-count formula subtracts two addresses for the network and directed broadcast. Applying that rule to every prefix incorrectly reports that /31 and /32 have no usable addresses.
RFC 3021 defines /31 addressing for IPv4 point-to-point links. Both addresses are interpreted as host addresses on that link, with no separate network or broadcast reservation. A /32 identifies one exact IPv4 address and is commonly used for host routes, loopback interfaces, and precise firewall or routing entries.
This calculator reports two usable point-to-point endpoints for /31 and one address for /32. Whether a particular device or provider supports those uses is still determined by that platform.
Private and special-purpose IPv4 address ranges
The “Address use” result recognizes public unicast addresses plus common entries from the IANA IPv4 Special-Purpose Address Registry, including private, shared, loopback, link-local, documentation, benchmarking, multicast, and reserved ranges. The three private-use blocks are:
| Private block | Address range | Common context |
|---|---|---|
10.0.0.0/8 | 10.0.0.0 – 10.255.255.255 | Large private networks and cloud virtual networks |
172.16.0.0/12 | 172.16.0.0 – 172.31.255.255 | Private organizational and container networks |
192.168.0.0/16 | 192.168.0.0 – 192.168.255.255 | Home and small-office networks |
A classification describes the entered address, not whether it is routed or reachable in a particular network. Provider policy, firewalls, routes, address translation, and platform reservations still determine how an address can be used.
Common subnet calculator questions
What is a subnet?
A subnet is a contiguous block of IP addresses identified by shared network bits. Routers and firewalls use that prefix to match a group of addresses without listing every address individually.
Does a /24 always have 254 usable hosts?
A conventional IPv4 /24 contains 256 addresses and leaves 254 after excluding its network and directed broadcast addresses. A hosting or cloud provider may reserve additional addresses, so its assignable count can be lower.
What is the difference between a subnet mask and wildcard mask?
A subnet mask uses ones for network bits and zeroes for host bits. A wildcard mask inverts those bits. For example, /24 is 255.255.255.0 with a wildcard mask of 0.0.0.255.
Why does the calculator reject leading zeroes?
Values such as 010 have historically been interpreted differently by different software. Requiring ordinary decimal notation keeps the address unambiguous.
Does this calculator support IPv6?
Yes. Enter compressed or expanded IPv6 with a prefix from /0 through /128. The calculator recognizes IPv6 automatically and reports its normalized and expanded address, network prefix, prefix mask, host bits, complete range, adjacent prefixes, and common address type. It also accepts IPv4-embedded forms such as ::ffff:192.0.2.1.
Why is there no usable-host count or broadcast address for IPv6?
IPv6 does not use broadcast addresses, and all-zero or all-one fields are generally legal. The calculator therefore reports the exact number of addresses in the prefix and its complete mathematical range rather than applying the IPv4 convention of subtracting two addresses. A platform may still reserve particular addresses for operational purposes.
Why is /64 so common in IPv6?
A /64 leaves a 64-bit interface identifier and is the standard subnet size for most IPv6 LANs and stateless address autoconfiguration. Longer prefixes are still useful for defined cases such as /127 inter-router links and /128 host routes.
Does Bitfoo receive or save the IP address?
No. The calculator performs fixed arithmetic in your browser. The entered address is not sent to an API, stored by the tool, added to the URL, or included in analytics.
Continue planning and operating a network
Set up a Linux VPS safely
Establish secure administrative access, updates, a firewall, monitoring, backups, and a tested recovery path.
Network securitySecure SSH and firewall access
Use key authentication, least privilege, configuration validation, and restricted firewall rules without locking yourself out.
Network toolLook up public DNS records
Check the A, AAAA, MX, TXT, NS, SOA, CAA, SRV, HTTPS, and PTR records returned by public resolvers.