Skip to main content
Free tool

Free Subnet Calculator

Enter an IPv4 or IPv6 address with a prefix or a mask and get the network, broadcast address, usable host range, masks and a binary view. Split any network into smaller subnets. It runs entirely in your browser, so nothing you type leaves this page.

Type an address and a prefix (/24) or a mask (255.255.255.0). IPv4 and IPv6 both work, and the answer updates as you type.

Try:

IPv4 network

192.168.1.0/24

254 usable hosts of 256 addresses

Network address
192.168.1.0
Broadcast address
192.168.1.255
First usable host
192.168.1.1
Last usable host
192.168.1.254
Usable hosts
254
Total addresses
256
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Prefix length
/24
Address class
CThe old classful label, kept for exams and legacy gear.
Address type
privatePrivate network (RFC 1918)
Your address as a number
32322357860xC0A8010A
Reverse DNS zone
1.168.192.in-addr.arpa

Binary view. Bold blue bits are the network part (the first 24), grey bits are the host part.

Address
11000000.10101000.00000001.00001010
Subnet mask
11111111.11111111.11111111.00000000
Network address
11000000.10101000.00000001.00000000

Split 192.168.1.0/24 into smaller subnets

Divide the network into equal subnets, by how many you need or by the size of each.

192.168.1.0/24 splits into 4 subnets of /26, each with 64 addresses and 62 usable hosts.

#SubnetFirst usableLast usableBroadcastUsable hosts
1192.168.1.0/26192.168.1.1192.168.1.62192.168.1.6362
2192.168.1.64/26192.168.1.65192.168.1.126192.168.1.12762
3192.168.1.128/26192.168.1.129192.168.1.190192.168.1.19162
4192.168.1.192/26192.168.1.193192.168.1.254192.168.1.25562

Scroll the table sideways to see every column.

A subnet tells you how addresses are grouped, not who is behind them

Look up where an address in this range is located, which network owns it and whether it is flagged as a VPN, proxy or datacenter. Check as many addresses as you like with a free 1Lookup account.

What each result means

The examples are for 192.168.1.10/24.

ResultWhat it isExample
Network addressThe first address of the block. It names the subnet and cannot be given to a device (except in a /31 or /32).192.168.1.0
Broadcast addressThe last address. A packet sent to it reaches every host in the subnet. A /31 and a /32 have none.192.168.1.255
First and last usable hostThe range you can hand out to devices: everything between the network and broadcast addresses.192.168.1.1 to 192.168.1.254
Usable hosts2 to the power of the host bits, minus the two reserved addresses.254
Subnet maskA 1 for every network bit and a 0 for every host bit, written as four numbers.255.255.255.0
Wildcard maskThe subnet mask turned inside out, as many router and firewall configurations write it.0.0.0.255
Prefix length (CIDR)The count of network bits, written after a slash. It is the short way to write the mask./24

CIDR cheat sheet: /8 to /32

Every IPv4 prefix length with its mask, wildcard and host counts. Usable hosts are the total minus the network and broadcast addresses, except /31 and /32.

PrefixSubnet maskWildcard maskTotal addressesUsable hostsCommon use
/8255.0.0.00.255.255.25516,777,21616,777,214The size of the 10.0.0.0/8 private block
/9255.128.0.00.127.255.2558,388,6088,388,606
/10255.192.0.00.63.255.2554,194,3044,194,302The size of the carrier-grade NAT block
/11255.224.0.00.31.255.2552,097,1522,097,150
/12255.240.0.00.15.255.2551,048,5761,048,574The size of the 172.16.0.0/12 private block
/13255.248.0.00.7.255.255524,288524,286
/14255.252.0.00.3.255.255262,144262,142
/15255.254.0.00.1.255.255131,072131,070
/16255.255.0.00.0.255.25565,53665,534A large campus or site (the old class B size)
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254The usual office or home network (the old class C size)
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614A small group of servers or devices
/29255.255.255.2480.0.0.786A tiny segment, such as a few servers
/30255.255.255.2520.0.0.342A point-to-point link between two routers
/31255.255.255.2540.0.0.122A point-to-point link with no broadcast (RFC 3021)
/32255.255.255.2550.0.0.011One address: a host route or a loopback

IPv6 prefix lengths

IPv6 has no broadcast address and nothing is subtracted: every address in a prefix is usable. These are the sizes you meet most.

PrefixAddressesTypical use
/322^96The usual size of an allocation to an internet provider
/482^80One site or organization: holds 65,536 networks of /64
/562^72A home or small site: holds 256 networks of /64
/642^64One network segment, the size automatic address setup (SLAAC) needs
/1272A point-to-point link between two routers (RFC 6164)
/1281A single address: a host route or a loopback

Private and special IPv4 ranges

The calculator labels a result with the range it falls in. These are the ones you will see most.

RangeAddressesWhat it is for
10.0.0.0/816,777,216Private (RFC 1918): large company networks and VPNs
172.16.0.0/121,048,576Private (RFC 1918): mid-size networks
192.168.0.0/1665,536Private (RFC 1918): home routers and small offices
100.64.0.0/104,194,304Shared address space for carrier-grade NAT (RFC 6598)
169.254.0.0/1665,536Link-local: what a device gives itself when no DHCP server answers
127.0.0.0/816,777,216Loopback: 127.0.0.1 means this computer

Looking for the term itself? See CIDR notation in the glossary.

How subnetting works, in four steps

  1. Write the address and the mask in binary. The mask is a run of 1s followed by a run of 0s. The number of 1s is the prefix length, so 255.255.255.0 is 24 ones and 8 zeros: a /24.
  2. Keep the network bits, zero the host bits. Combine the address and the mask bit by bit (a bitwise AND). What is left is the network address: 192.168.1.10 with a /24 becomes 192.168.1.0.
  3. Set every host bit to 1 for the broadcast address. That gives the last address of the block, 192.168.1.255. The calculator shows both lines in the binary view, with the network bits in bold.
  4. Count what is in between. The addresses from network plus one to broadcast minus one are the usable hosts. With 8 host bits that is 2^8 − 2 = 254. Each bit you move from the host side to the network side halves the subnet.

Frequently asked questions

What is a subnet calculator?

A subnet calculator takes an IP address and a prefix length or subnet mask and works out the network it belongs to: the network address, the broadcast address, the range of addresses you can give to devices, how many fit, and the masks. This one handles IPv4 and IPv6, shows the mask in binary, and can split a network into smaller subnets.

How do I work out how many usable hosts a subnet has?

Subtract the prefix length from 32 to get the number of host bits, raise 2 to that power, then subtract 2 because the first address (the network address) and the last (the broadcast address) cannot be given to a device. A /24 has 8 host bits, so 2^8 = 256 addresses and 254 usable hosts. A /26 has 6 host bits: 64 addresses, 62 usable. The two exceptions are /31 (2 usable) and /32 (1).

What does the number after the slash mean?

It is the prefix length from CIDR notation: how many of the address's leading bits identify the network. In 192.168.1.0/24 the first 24 of 32 bits are the network and the last 8 are for hosts. A smaller number means a bigger network: a /16 holds 65,536 addresses, a /24 holds 256, a /30 holds 4.

What is the difference between a subnet mask and a wildcard mask?

A wildcard mask is the subnet mask turned inside out. The mask 255.255.255.0 has the wildcard 0.0.0.255. A subnet mask marks the bits that name the network, and a wildcard mask marks the bits that may vary; some router and firewall configurations are written with wildcards. You can type either: a value like 0.0.255.255 is not a valid subnet mask, so the calculator reads it as a wildcard and tells you so.

Why does a /31 have two usable addresses?

The classic rule sets aside the first and last address of every subnet, which would leave a /31 with none. RFC 3021 changed that for point-to-point links: a link with two ends has no use for a broadcast address, so both addresses can be hosts. The calculator shows both as usable and no broadcast. A /32 is a single address, used for a host route or a loopback.

How is IPv6 subnetting different?

IPv6 has no broadcast address and nothing is subtracted: every address in a prefix is usable. Addresses are 128 bits, so prefixes run from /0 to /128. One network segment is normally a /64, because automatic address setup (SLAAC) needs 64 host bits. A site usually receives a /48 or a /56 from its provider, which holds 65,536 or 256 networks of /64.

Is anything I type sent to a server?

No. The calculation runs in your browser, so the address and mask you type never leave your device. Like the rest of this site, the page records that the calculator was used, along with the IP version and a rough size band for the prefix, but never the address itself. There is no limit and no signup.

What does public, private or reserved mean in the result?

Private ranges (10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 in IPv4, fc00::/7 in IPv6) are for use inside a home or company network and are not routed on the public internet. Reserved ranges are set aside for things like loopback, link-local addresses, multicast and documentation. Public means the range is outside all of those. It does not mean the addresses are assigned or in use: to see who an address belongs to, run it through an IP lookup.

How do I split a network into smaller subnets?

Choose how many subnets you need, or the prefix length of each, in the split panel under the result. Each extra bit of prefix doubles the number of subnets and halves their size: a /24 split into 4 gives four /26 networks of 62 usable hosts each. Subnets here are all the same size, so a count that is not a power of two is rounded up. For subnets of different sizes, split the network in two and split one half again.

Is this subnet calculator free?

Yes, with no signup and no limit. It is a form in your browser with no server call behind it, so there is nothing to meter.