CIDR / Subnet Calculator

Network, broadcast, mask and host count for an IPv4 CIDR block.

About CIDR / Subnet Calculator

A CIDR calculator turns an IPv4 block such as 192.168.1.37/24 into its network and broadcast address, host range, subnet and wildcard masks and host count.

How to use

  1. Type an address with a prefix length, for example 10.0.0.0/8 or 192.168.1.37/24. The result updates as you type.
  2. A bare address without a slash is read as a single host, /32.
  3. Copy any row from the result, or the whole table with the Copy button on the panel.

What it does

  • Works out the network address by masking the host bits to zero and the broadcast address by setting them to one.
  • Lists the first and last usable host. For a /31 both addresses are usable (RFC 3021, point-to-point links) and a /32 is one host; for everything else the network and broadcast addresses are excluded, so a /24 has 254 usable hosts.
  • Shows the subnet mask in dotted decimal and in binary, the wildcard mask (the inverse, used in Cisco access lists), and the total number of addresses in the block.
  • Tells you whether the address is private (RFC 1918: 10/8, 172.16/12, 192.168/16), loopback, link-local, carrier-grade NAT, multicast or public.
  • IPv4 only. IPv6 prefixes are not supported.

Example

192.168.1.37/24
Network      192.168.1.0        Broadcast   192.168.1.255
First host   192.168.1.1        Last host   192.168.1.254
Usable       254                Total       256
Mask         255.255.255.0      Wildcard    0.0.0.255

Privacy

The calculation runs in the browser. No request is made, and nothing is stored.

Frequently asked questions

What does /24 mean in an IP address?
The number after the slash is how many leading bits of the address identify the network. /24 means the first 24 bits (three octets) are the network and the last 8 are hosts, which is a subnet mask of 255.255.255.0 and 256 addresses.
How many hosts are in a /24?
256 addresses, of which 254 are usable. The first (the network address) and the last (the broadcast address) are reserved. In general a /n block has 2^(32-n) addresses and two fewer usable hosts.
What is the difference between a subnet mask and a wildcard mask?
They are bitwise inverses. The subnet mask has ones for the network bits (255.255.255.0 for a /24); the wildcard mask has ones for the host bits (0.0.0.255) and is what Cisco access lists and OSPF configuration expect.
Which IP ranges are private?
RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16 for private networks. They are not routed on the public internet, so the same addresses can be reused behind every NAT.