MikroBI Robot Logo

MikroBI | DevKit

lan

IPv4 / IPv6 Subnet Calculator

Enter an address with a prefix length to compute its network range, mask, and usable hosts, entirely offline.

Related tools

About this tool

A subnet calculator turns CIDR notation — an address followed by a slash and a prefix length, like 192.168.1.10/24 — into the concrete numbers a network engineer actually needs: where the network starts, where it ends, which addresses are reserved, and how many hosts can actually be assigned. Working these out by hand means converting the prefix length into a binary mask, ANDing it against the address, and tracking off-by-one edge cases at both ends of the range. This tool does that arithmetic instantly and shows every intermediate value, not just the final answer.

For IPv4, the calculator reports the network and broadcast addresses, the dotted-decimal subnet mask and its wildcard-mask complement (the form Cisco ACLs expect), the first and last usable host addresses, the total address count, and the number of hosts actually usable once the network and broadcast addresses are set aside. It also handles the two classic edge cases correctly: a /31 is treated as a point-to-point link where both addresses are usable per RFC 3021, and a /32 is a single host route with no broadcast address at all.

IPv6 addresses are supported the same way, using 128-bit arithmetic rather than the 32-bit math IPv4 needs. Enter an address like 2001:db8::1/64 and the tool expands any "::" shorthand, computes the network's first and last address, and re-compresses the result back into the shortest valid textual form. Because IPv6 subnets are almost always sized in the trillions or more, the total address count is shown as a power of two (like 2^64) rather than a wall of digits.

Everything runs as plain arithmetic in your browser — there's no lookup against a routing table, no external API call, and nothing you type is sent anywhere. That makes it safe to paste in real internal addressing, even for a network you'd rather not describe to a third-party website, and it keeps working with no internet connection at all.

This comes up constantly when planning a new VLAN or subnet split, checking whether two ranges overlap, sanity-checking a firewall rule written in CIDR notation, or figuring out how many usable IPs a given prefix actually leaves after reserving the network and broadcast addresses. Use the "Send to" button to carry the computed network address straight into another tool that accepts a CIDR-shaped input.

Frequently asked questions

What format does the input need to be in? expand_more

An address followed by a slash and a prefix length, e.g. 192.168.1.10/24 for IPv4 or 2001:db8::1/64 for IPv6. The prefix length is required.

Why does a /31 show 2 usable hosts instead of 0? expand_more

RFC 3021 defines /31 as a special case for point-to-point links: with only two addresses in the range, both are treated as usable hosts rather than one being reserved as a broadcast address.

Why is there no broadcast address for IPv6? expand_more

IPv6 has no broadcast concept at all — it uses multicast instead — so the calculator only reports the first and last address of the range for IPv6 input.

Does this tool need an internet connection? expand_more

No. Every calculation is plain binary arithmetic performed locally in your browser, so it works fully offline once the page has loaded.

Can I calculate a subnet from a dotted subnet mask instead of a prefix length? expand_more

Enter the CIDR prefix length form (e.g. /24). A /24 is equivalent to a 255.255.255.0 mask — the wildcard mask row shows the complement form used by tools like Cisco access lists.