Subnet / CIDR Calculator

Work out the network address, broadcast address, mask and usable host range for an IPv4 block in CIDR notation.

192.168.1.0/24Network
255.255.255.0Netmask
0.0.0.255Wildcard
192.168.1.255Broadcast
192.168.1.1First host
192.168.1.254Last host
256Total addresses
254Usable hosts
IPv4 only. /31 (point-to-point) and /32 (single host) follow RFC 3021 behaviour.

About Subnet / CIDR Calculator

The Subnet / CIDR Calculator works out the network address, broadcast address, netmask and usable host range for any IPv4 block in CIDR notation.

Example

192.168.1.130/26 is in network 192.168.1.128/26, mask 255.255.255.192, with 62 usable hosts.

Quick check by hand

32 minus the prefix gives the host bits; 2 to that power is the block size. A /26 has 6 host bits, so 64 addresses.

Edge cases

/31 follows RFC 3021 (both addresses usable on point-to-point links) and /32 is a single host.

Good to know

IPv4 only; no IPv6 or subnet splitting.

Private

Everything runs in your browser. Nothing you type is uploaded.

What is CIDR?

CIDR (Classless Inter-Domain Routing) writes a network as an address plus the number of network bits, such as 192.168.1.0/24. It replaced the old class A, B and C system in 1993.

Wildcard mask

A wildcard mask is the netmask with its bits flipped, used in Cisco access lists and OSPF. For a /24 the netmask is 255.255.255.0 and the wildcard is 0.0.0.255.

How to use Subnet / CIDR Calculator

  1. Type an IPv4 address and a prefix in the box, for example 192.168.1.130/26.
  2. Read the network, netmask, wildcard and broadcast values.
  3. Read the first and last usable host and the usable host count.
  4. For another block change the text; results update at once.

Help & FAQ

What does the calculator show?

The network address with prefix, the netmask, the wildcard mask, the broadcast address, the first and last usable host, the total number of addresses and the number of usable hosts.

How do we enter a subnet mask like 255.255.255.0?

The box takes a prefix, not a dotted mask. Write 192.168.1.0/24 instead. A dotted mask after the slash shows a hint to use the form 192.168.1.10/24.

Why are usable hosts two fewer than total addresses?

The first address of a block is the network address and the last is the broadcast, and neither is normally given to a host. A /26 has 64 addresses and 62 usable hosts.

How are /31 and /32 handled?

Following RFC 3021, a /31 has two usable addresses for a point to point link, and a /32 is one single host. Both show a dash for the broadcast.

Does it support IPv6?

No. It is IPv4 only. An IPv6 address shows the hint to use the IPv4 form.

What happens if we type a host address, not the network address?

The tool shows the block that contains it. For 192.168.1.130/26 it reports the network 192.168.1.128/26 and a broadcast of 192.168.1.191.

What is the wildcard mask?

It is the netmask with every bit flipped. The mask 255.255.255.192 has the wildcard 0.0.0.63. Access lists on some routers use wildcards.

Which error messages can we get?

A prefix above 32 shows Prefix must be 0-32. An octet above 255 shows that it is not a valid IPv4 address. A missing slash shows the hint to use the form 192.168.1.10/24.

Does it accept leading zeros?

Yes, 192.168.001.1 was read as 192.168.1.1. Some systems read leading zeros as octal numbers, so avoid them in real configuration.

Can it split a network into smaller subnets?

Not directly. Calculate each smaller block in turn, for example a /24 holds four /26 blocks that start at .0, .64, .128 and .192.

Do cloud providers use the same usable host count?

Not always. Many reserve extra addresses in each subnet, so a provider may give fewer usable hosts than this calculator. Check the provider's rule.

Is our address sent anywhere?

No. The calculation runs in your browser and nothing is uploaded.

More in Web & Network

See all 8 in Web & Network