Network

Subnet Calculator

IPv4 & IPv6

Calculate a subnet

Enter an address with a prefix, netmask or wildcard mask, a range, or an IPv6 block. Results update as you type.
Try:

192.168.1.0/24

254 usable hosts · Private (RFC 1918)
Network: 24 bitsHost: 8 bits
Network
192.168.1.0/24
Broadcast
192.168.1.255
Usable range
192.168.1.1 – 192.168.1.254
Usable hosts
254
256 total, minus network and broadcast
Netmask
255.255.255.0
Wildcard mask
0.0.0.255
Address type
Private (RFC 1918)
For internal networks; not routed on the internet.
Class
C
Historical; routing has used CIDR since 1993.
Reverse DNS zone
1.168.192.in-addr.arpa
Hex
0xC0A80100
Integer
3232235776
Look up PTR records for this block with the PTR lookup.

Subnet tools

Work with 192.168.1.0/24
4 subnets of 62 usable hosts each.
#SubnetUsable rangeBroadcast
1192.168.1.0/26192.168.1.1 – 192.168.1.62192.168.1.63
2192.168.1.64/26192.168.1.65 – 192.168.1.126192.168.1.127
3192.168.1.128/26192.168.1.129 – 192.168.1.190192.168.1.191
4192.168.1.192/26192.168.1.193 – 192.168.1.254192.168.1.255

IPv4 prefix reference

Every prefix from /0 to /32. Select a row to apply it to the current address.
PrefixNetmaskWildcardAddressesUsable hosts
0.0.0.0255.255.255.2554,294,967,2964,294,967,294
128.0.0.0127.255.255.2552,147,483,6482,147,483,646
192.0.0.063.255.255.2551,073,741,8241,073,741,822
224.0.0.031.255.255.255536,870,912536,870,910
240.0.0.015.255.255.255268,435,456268,435,454
248.0.0.07.255.255.255134,217,728134,217,726
252.0.0.03.255.255.25567,108,86467,108,862
254.0.0.01.255.255.25533,554,43233,554,430
255.0.0.00.255.255.25516,777,21616,777,214
255.128.0.00.127.255.2558,388,6088,388,606
255.192.0.00.63.255.2554,194,3044,194,302
255.224.0.00.31.255.2552,097,1522,097,150
255.240.0.00.15.255.2551,048,5761,048,574
255.248.0.00.7.255.255524,288524,286
255.252.0.00.3.255.255262,144262,142
255.254.0.00.1.255.255131,072131,070
255.255.0.00.0.255.25565,53665,534
255.255.128.00.0.127.25532,76832,766
255.255.192.00.0.63.25516,38416,382
255.255.224.00.0.31.2558,1928,190
255.255.240.00.0.15.2554,0964,094
255.255.248.00.0.7.2552,0482,046
255.255.252.00.0.3.2551,0241,022
255.255.254.00.0.1.255512510
255.255.255.00.0.0.255256254
255.255.255.1280.0.0.127128126
255.255.255.1920.0.0.636462
255.255.255.2240.0.0.313230
255.255.255.2400.0.0.151614
255.255.255.2480.0.0.786
255.255.255.2520.0.0.342
255.255.255.2540.0.0.122
255.255.255.2550.0.0.011

What a subnet is and how the prefix works

How a prefix splits an address into network and host

A subnet is a block of addresses that share the same leading bits. In CIDR notation, 192.168.1.0/24 means the first 24 bits identify the network and the remaining 8 bits number the hosts, giving 256 addresses.

In IPv4 the first address of a block is the network address and the last is the broadcast address, so a /24 has 254 usable hosts. IPv6 has no broadcast address, and a LAN is normally a /64. Move the prefix on the bit ruler above to see how each extra network bit halves the block.

CIDR prefix
/n: the number of network bits. Each step shorter doubles the block.
Netmask
The prefix written as an address, e.g. /24 = 255.255.255.0.
Wildcard mask
The inverted netmask used in Cisco ACLs and OSPF, e.g. 0.0.0.255.

How to use this tool

Calculate and plan a subnet in four steps
1
Enter a network
Type an address with a prefix, a netmask or a wildcard mask, a range, or an IPv6 block.
2
Adjust the prefix
Drag the slider or use − and + to grow or shrink the block. Results update as you go.
3
Read and copy the results
Copy any value, all of them, or a link that reopens this exact calculation.
4
Plan the address space
Split the block into equal subnets, or list your networks by host count and let the planner place them.

Frequently asked questions

Common questions about subnets
6 Q&A

2(32 − prefix) − 2 for IPv4. A /24 has 254 usable hosts, a /26 has 62 and a /30 has 2. A /31 point-to-point link has 2 (RFC 3021), and a /32 is a single address.

They express the same thing. CIDR writes the number of network bits (/24); the netmask writes them as an address (255.255.255.0). This calculator accepts either, and a wildcard mask too.

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918). Carrier-grade NAT uses 100.64.0.0/10, which is not private space either.

In IPv4 the first identifies the network itself and the last is the broadcast address that reaches every host, so neither is given to a device. IPv6 has no broadcast, so every address can be used.

Yes. Enter a block like 2001:db8::/48 to see its range, size, address type and reverse DNS zone, and split it into /64s for your LANs.

The in-addr.arpa or ip6.arpa zone where PTR records for the block live. A block that doesn’t fall on an octet (IPv4) or hex-digit (IPv6) boundary spans several zones; an IPv4 block smaller than a /24 is delegated from its /24 using RFC 2317.