Subnet calculator
Type an IPv4 or IPv6 network to see its usable range, hosts, mask, wildcard and binary as you type. Nothing leaves your browser.
Accepts CIDR (192.0.2.0/24), IP + mask (192.0.2.0 255.255.255.0), a bare IP (defaults to /24), or IPv6 (2001:db8::/48). Arrow Up and Arrow Down change the prefix.
11000000.00000000.00000010.0000000011111111.11111111.11111111.00000000Networking calculators
All toolsCIDR calculator
Expand a CIDR block into its range, or turn a range into CIDR blocks.
Subnet mask calculator
Convert between prefix length and subnet mask, both directions.
Wildcard mask calculator
Turn a subnet mask into the wildcard mask used in Cisco ACLs.
Supernet calculator
Summarize multiple networks into one aggregate CIDR route.
IPv6 subnet calculator
Expand, compress, and subnet any IPv6 prefix.
IP converter
Convert IPs between decimal, integer, binary, hex and octal, in bulk.
MAC address formatter
Reformat a MAC address between colon, dash, dotted and bare forms.
Random IP generator
Generate random valid IPv4 addresses, public or private, for testing.
Reference
CIDR cheat sheetCIDR cheat sheet
Every prefix from /0 to /32 with its mask, wildcard, and host count.
Port numbers
Common TCP and UDP ports, what they do, and their security notes.
Subnet by host count
Need room for N hosts? Find the smallest block that fits.
What is a subnet?
A plain-English guide to subnetting, masks, and CIDR.
Free JSON API
Keyless CIDR and port lookups you can build on. No rate limits.
Frequently asked questions
What is the usable host range?
It is every address in the block except the first, the network address, and the last, the broadcast address. For 192.0.2.0/24 that is 192.0.2.1 to 192.0.2.254, which is 254 usable hosts; a /30 has 2. A /31 point-to-point link uses both of its addresses (RFC 3021), so it has 2, and a /32 is a single host, so it has 1.
What does a subnet calculator do?
It takes an IP address and a prefix or mask, then works out the network address, broadcast address, usable host range, host count, subnet mask, wildcard mask and binary form. SubnetKit does all of this instantly in your browser, for IPv4 and for IPv6.
How do I calculate a subnet?
Enter the IP with its prefix, such as 192.0.2.0/24, or an IP with a dotted mask, such as 192.0.2.0 255.255.255.0. The calculator reads off the network, first and last usable host, broadcast and total addresses as you type. Arrow Up and Arrow Down in the field, or the minus and plus buttons next to it, change the prefix by one.
Does it work with IPv6?
Yes. Type an IPv6 network such as 2001:db8::/48 into the same field. You get the network, the first and last address, the prefix, the number of addresses and the number of /64 subnets, which is 65,536 for a /48. IPv6 has no broadcast address, so every address in the block is usable.
Can it split a network into smaller subnets?
Yes. The Plan tab splits a block into equal subnets or sizes each one by host count (VLSM), and exports the plan as CSV, Markdown, JSON or Terraform. The Batch tab checks a whole list of ranges at once for overlaps, gaps and the smallest set of CIDR blocks that covers them.
Is SubnetKit free?
Yes. Every calculator and reference page is free with no sign up and no limits. Nothing you type is uploaded, because the maths runs entirely on your device.
Why SubnetKit
Most subnet calculators reload the page when you submit, bury the result under ads, or make you pick IPv4 or IPv6 first. SubnetKit takes either in one field, shows everything at once and recomputes on every keystroke. It is built for people who reach for a subnet calculator ten times a day and want it to get out of the way.
Because all the maths is plain JavaScript running in your browser, nothing you type is ever sent to a server. That also makes it fast: there is no round trip, so results appear the instant you type. Pair it with the CIDR reference for the full prefix table, or the IPv6 subnet calculator for the expanded form and more IPv6 detail.
Do this from the terminal
The same reference data is a keyless JSON endpoint, and there are good local tools that need no network at all.
curl -s https://subnetkit.dev/api/cidr/24.json | jq # or locally, with no network at all: ipcalc 192.0.2.0/24 sipcalc 192.0.2.0/24
ipcalc ships in most Linux distributions and sipcalc handles IPv4 and IPv6. Both give the same network, broadcast and host range this page does.
The SubnetKit API is the one to reach for in a build step or a script. It has no key and no rate limit, and the full schema is in the OpenAPI document.