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.

254 usable hosts, 192.0.2.1 to 192.0.2.254
A /24 splits the 32 address bits into 24 network bits and 8 host bits.
Network address192.0.2.0
Usable host range192.0.2.1 - 192.0.2.254
Broadcast address192.0.2.255
Usable hosts254
Subnet mask255.255.255.0
Wildcard mask0.0.0.255
CIDR notation192.0.2.0/24
Total addresses256
IP classC
RoleStandard LAN size
Prefix length/24
IP (binary)11000000.00000000.00000010.00000000
Mask (binary)11111111.11111111.11111111.00000000
Try:

Keyboard shortcuts

c
Copy the network in CIDR notation
a
Copy all values
s
Star or unstar the network
?
Show this overview
Arrow Up Arrow Down
In the address field: change the prefix by 1
/ or Ctrl K
Search the site
Esc
Close this overview

Single-key shortcuts only work while no text field has focus.

Networking calculators

All tools

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.