Subnet calculator

Subnet Calculator for IPv4 and IPv6

Enter an IP address with a CIDR prefix or a subnet mask. You get the network, usable range, broadcast and host count as you type, and can split it into smaller subnets.

Try: · · ·

192.168.1.0/24 · 254 usable hosts

Address type
Private network (RFC 1918)
Network
192.168.1.0/24
Usable range
192.168.1.1 to 192.168.1.254
Broadcast
192.168.1.255
Usable hosts
254
Total addresses
256
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
CIDR prefix
/24
Class (historic)
C
Reverse DNS
10.1.168.192.in-addr.arpa

In binary network bits · host bits

Address
11000000.10101000.00000001.00001010
Mask
11111111.11111111.11111111.00000000
Network
11000000.10101000.00000001.00000000

Calculated in your browser. Nothing you type is sent to MyIPSpot. Copy link keeps the subnet after the # in the address, so you can bookmark or share it.

Split into smaller subnets

4 subnets of /26, each with 62 usable hosts

SubnetUsable rangeBroadcast
192.168.1.0/26 192.168.1.1 to 192.168.1.62 192.168.1.63
192.168.1.64/26 192.168.1.65 to 192.168.1.126 192.168.1.127
192.168.1.128/26 192.168.1.129 to 192.168.1.190 192.168.1.191
192.168.1.192/26 192.168.1.193 to 192.168.1.254 192.168.1.255

How subnetting works

An IPv4 address is 32 bits. The prefix says how many of those bits, from the left, name the network. The rest number the devices inside it. In 192.168.1.10/24, the first 24 bits (192.168.1) are the network and the last 8 bits (.10) are the device.

Eight host bits give 2⁸ = 256 addresses. The first, 192.168.1.0, names the network itself, and the last, 192.168.1.255, is the broadcast address that reaches every device at once. That leaves 254 addresses for devices.

Make the prefix one bit longer and the block halves: a /25 has 128 addresses, a /26 has 64. That's how a network is split into subnets, and it's what the split tool above lists for you.

CIDR cheat sheet

Every IPv4 prefix with its subnet mask and size. Select a prefix to calculate it for your address.

PrefixSubnet maskAddressesUsable hosts
0.0.0.0 4,294,967,296 4,294,967,294
128.0.0.0 2,147,483,648 2,147,483,646
192.0.0.0 1,073,741,824 1,073,741,822
224.0.0.0 536,870,912 536,870,910
240.0.0.0 268,435,456 268,435,454
248.0.0.0 134,217,728 134,217,726
252.0.0.0 67,108,864 67,108,862
254.0.0.0 33,554,432 33,554,430
255.0.0.0 16,777,216 16,777,214
255.128.0.0 8,388,608 8,388,606
255.192.0.0 4,194,304 4,194,302
255.224.0.0 2,097,152 2,097,150
255.240.0.0 1,048,576 1,048,574
255.248.0.0 524,288 524,286
255.252.0.0 262,144 262,142
255.254.0.0 131,072 131,070
255.255.0.0 65,536 65,534
255.255.128.0 32,768 32,766
255.255.192.0 16,384 16,382
255.255.224.0 8,192 8,190
255.255.240.0 4,096 4,094
255.255.248.0 2,048 2,046
255.255.252.0 1,024 1,022
255.255.254.0 512 510
255.255.255.0 256 254
255.255.255.128 128 126
255.255.255.192 64 62
255.255.255.224 32 30
255.255.255.240 16 14
255.255.255.248 8 6
255.255.255.252 4 2
255.255.255.254 2 2
255.255.255.255 1 1

Private and special IPv4 ranges

The private ranges are free for anyone to use inside a home or company network and never appear on the public internet. The calculator labels every address with the range it belongs to.

RangeUsed for
Private network (RFC 1918)
Private network (RFC 1918)
Private network (RFC 1918)
Shared address space for carrier-grade NAT (RFC 6598)
Loopback: the device itself
Link-local: self-assigned when no router answers
"This network": not used as a destination
Reserved for protocol assignments
Documentation and examples (TEST-NET-1)
Documentation and examples (TEST-NET-2)
Documentation and examples (TEST-NET-3)
Network benchmark testing
Multicast
Limited broadcast
Reserved for future use

Frequently asked questions

A subnet mask marks which part of an IP address names the network and which part names the device. Written in binary it is a run of 1s followed by 0s: the 1s cover the network part. 255.255.255.0 has 24 ones, so it is the same as /24.

Related

More network tools