IP Calculator & Subnet Calculator
A complete IPv4 and IPv6 subnet, CIDR, and VLSM calculator.
Enter an IP address and a prefix length or subnet mask to get the network, broadcast, usable host range, address counts, masks, binary form, and address type — plus subnet splitting for IPv4 and expansion/compression for IPv6.
Every calculation runs in your browser. Nothing you enter is sent to a server, and no calculation API is used.
What this IP calculator does
This is a free IP and subnet calculator for IPv4 and IPv6. Give it an IP address with a prefix length or subnet mask and it works out the network address, broadcast address, first and last usable host, total and usable address counts, the subnet mask and wildcard mask, the CIDR notation, the historical IP class, and the binary form of the address. It also divides a network into equal subnets or variable-length subnets (VLSM), and normalizes, expands, and compresses IPv6 addresses.
Every calculation runs as JavaScript on this page. Nothing you type is sent to a server, and the tool keeps working with no network connection once the page has loaded.
How to use it
- Choose the IPv4 or IPv6 tab.
- Type an address in CIDR form (
192.168.1.10/24,2001:db8::1/64) or put the address and the mask / prefix in the two separate fields. - Press Calculate. Use the copy buttons to grab any value; press Reset to clear.
- For IPv4, use Divide into subnets to split the result by new prefix, by number of subnets, or by hosts per subnet — or plan variable-length subnets for a set of differently sized networks.
CIDR, subnet masks and wildcard masks
A prefix length such as /24 is the number of leading 1-bits in the subnet mask. /24 is 255.255.255.0; the wildcard mask (used in some ACLs) is its bit-complement, 0.0.0.255. The number of addresses in a block is 2 to the power of the number of host bits: a /24 has 32 − 24 = 8 host bits, so 28 = 256 addresses.
Usable hosts, and the /31 and /32 special cases
For prefixes up to /30, two addresses in every block are reserved — the network address and the broadcast address — so usable hosts = 2host bits − 2. A /24 has 254 usable hosts, a /30 has 2.
- /31 is a point-to-point link (RFC 3021). It has exactly two addresses and both are usable — there is no network or broadcast address to set aside, so the “minus 2” rule does not apply.
- /32 is a single host address (a “host route”). It is one address with no separate network or broadcast address.
- /0 covers the entire IPv4 address space, 0.0.0.0 – 255.255.255.255.
IPv6 notes
IPv6 addresses are 128 bits and are written as eight groups of four hex digits. Leading zeros in a group are dropped and one run of all-zero groups can be replaced by :: (RFC 5952). This tool shows both the compressed and fully expanded forms, the network prefix, the first and last address of the prefix, and the address count (as an exact number and as a power of two). IPv6 has no broadcast address; the last address of a prefix is an ordinary unicast address. Address counts are computed with BigInt, so even a /0 (2128 addresses) is exact.
FAQ
Is this an IP subnet calculator, a CIDR calculator, or an IPv4/IPv6 calculator?
All of them. The IPv4 tab is a full subnet / CIDR / subnet-range calculator with equal-subnet and VLSM splitting; the IPv6 tab handles prefixes, normalization, expansion/compression, prefix range, and address counts.
Does the calculator send my IP addresses anywhere?
No. The math runs in your browser. There is no calculation API, and addresses you enter are not stored in a database, a log, or analytics — analytics records only that a calculation happened, never the values.
Does it need an internet connection?
Only to load the page the first time. After that the calculator works offline; changing the input and recalculating makes no further network requests.
Why does /31 show two usable hosts instead of zero?
Because RFC 3021 defines /31 for point-to-point links where both addresses are assigned to the two ends. The traditional “subnet size minus 2” rule is for /30 and shorter.
What is a wildcard mask?
The bit-complement of the subnet mask (/24 → mask 255.255.255.0 → wildcard 0.0.0.255). It is used to match address ranges in some access control lists and routing statements.
Are IP classes still relevant?
Not for routing. Classes A–E date from 1981 and were replaced by CIDR (classless addressing) in 1993. The calculator shows the class for reference, but the prefix length is what matters today.
How large a network can it handle?
Any IPv4 prefix from /0 to /32 and any IPv6 prefix from /0 to /128. Subnet tables are capped at a few hundred visible rows for readability, but the true subnet count is always reported.
From the blog
- IP Subnetting Explained: CIDR, Subnet Masks and Usable Hosts, With Worked Examples
What does 192.168.1.10/24 actually mean, why does a /24 give you 254 devices instead of 256, and how do you split a network for staff, guests and cameras? A plain-English guide to IP subnetting, with worked examples you can check in a free IP calculator.
Don't see the tool you need?
Goeroe Digital builds custom calculators, generators, and business tools on request.
Request a Custom ToolThis is a free tool provided by Goeroe Digital. All results, generated files, and figures are estimates or drafts for general informational use only. Goeroe Digital accepts no responsibility or liability for any output, outcome, loss, or decision arising from the use of these free tools — always review the results yourself before relying on them.