Skip to content

CIDR Calculator - IPv4 & IPv6 Subnet Calculator

Network192.168.1.0/24
Broadcast192.168.1.255
First host192.168.1.1
Last host192.168.1.254
Usable hosts254
Total addresses256
Netmask255.255.255.0
Wildcard0.0.0.255
Prefix length/24
Address11000000.10101000.00000001.00000000
Netmask11111111.11111111.11111111.00000000
SubnetRangeHosts
192.168.1.0/26192.168.1.1 – 192.168.1.6262
192.168.1.64/26192.168.1.65 – 192.168.1.12662
192.168.1.128/26192.168.1.129 – 192.168.1.19062
192.168.1.192/26192.168.1.193 – 192.168.1.25462

Subnet details from a CIDR block

Type an address with a prefix, such as 10.20.0.0/16, and the calculator shows the network address, broadcast address, first and last usable host, host count, netmask and wildcard mask. It handles IPv4 and IPv6, and runs in your browser.

How to use the calculator

The address does not have to be the network address. Enter any address inside the block, such as 172.16.40.7/21, and the calculator works out the network it belongs to (172.16.40.0/21). A bare address is treated as a single host (/32 or /128). For IPv4 you can type a dotted netmask instead of a prefix: 10.1.2.3 255.255.240.0 is read as /20. Non-contiguous masks such as 255.0.255.0 are rejected. Every value in the results has a copy button.

Example

Input: 192.168.1.130/26

Network:        192.168.1.128/26
Broadcast:      192.168.1.191
First host:     192.168.1.129
Last host:      192.168.1.190
Usable hosts:   62
Total addresses: 64
Netmask:        255.255.255.192
Wildcard:       0.0.0.63
Binary netmask: 11111111.11111111.11111111.11000000

The address 192.168.1.130 sits in the third /26 block of the 192.168.1.0/24 network. The last 6 bits are for hosts, giving 26 = 64 addresses, minus the network and broadcast addresses.

Binary view

For IPv4 the calculator shows the address and netmask in binary, with the network bits highlighted. This makes it clear why a /26 boundary falls at .0, .64, .128 and .192, and why an address belongs to one subnet and not the next.

Split a network into subnets

Pick a number of equal subnets. Splitting 10.0.0.0/16 into 4 gives 10.0.0.0/18, 10.0.64.0/18, 10.0.128.0/18 and 10.0.192.0/18, one per availability zone. Subnets of different sizes (a /20 for private, a /24 for public) need planning by hand: allocate the largest first so the smaller ones fit into the remaining space on aligned boundaries.

Common prefix sizes

  • /32: a single IPv4 host, often used in allow lists.
  • /30 and /31: point-to-point links between routers. A /31 saves two addresses per link.
  • /24: 254 hosts, a typical office or home LAN.
  • /28: 14 hosts, the smallest subnet AWS allows.
  • /16: 65,534 hosts, the largest AWS VPC block and a common default.
  • /64: the standard IPv6 subnet size for a single LAN.
  • /48: a typical IPv6 allocation for a whole site.

Private address ranges

The IPv4 ranges reserved for private networks (RFC 1918) are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. For IPv6, unique local addresses use fc00::/7. To look up the owner of a public address, try the reverse DNS lookup.

Related Tools

Frequently Asked Questions

What does /24 mean in CIDR notation?
The number after the slash is the prefix length: how many leading bits of the address identify the network. A /24 fixes the first 24 bits, leaving 8 bits for hosts, which gives 256 addresses (254 usable on IPv4). It is the same as the netmask 255.255.255.0.
Why are there 2 fewer usable hosts than addresses?
In an IPv4 subnet the first address identifies the network and the last is the broadcast address, so neither can be given to a host. The exceptions are /31, used for point-to-point links where both addresses are usable (RFC 3021), and /32, which is a single host.
Why does AWS show fewer usable addresses than this?
AWS reserves five addresses in every VPC subnet, not two: the network address, .1 for the VPC router, .2 for DNS, .3 for future use, and the broadcast address. A /24 gives 251 usable addresses in AWS against 254 here, and a /28 (the smallest AWS subnet) gives 11 against 14. Azure also reserves five. Subtract three more from the usable figure when sizing cloud subnets.
What is a wildcard mask?
The wildcard mask is the netmask with every bit flipped, for example 0.0.0.255 for a /24. Cisco access lists and OSPF configuration use wildcard masks to say which bits may vary.
Does it support IPv6?
Yes. Enter an address such as 2001:db8::/48 to see the network, the first and last address and the number of addresses. IPv6 has no broadcast address, so every address in the range is counted. Results use the compressed form recommended by RFC 5952.
How does splitting a network work?
Pick 2, 4, 8 and so on up to 256. Each doubling borrows one host bit, so splitting a /24 into 4 gives four /26 networks of 64 addresses each. Only powers of two are offered because equal subnets have to align on bit boundaries.