IP Subnet Calculator & CIDR IPv4 Range Finder

Copied!

IPv4 Subnet Calculator

All-in-one IP subnetting, CIDR analysis & network planning tool

Tip: you can also type 10.0.0.0/8 or 172.16.5.4 255.255.240.0 directly.

Address scope allocation99.22% usable hosts
Network ID Usable hosts Broadcast IP
Network Address
192.168.1.0
Broadcast Address
192.168.1.255
Usable Host Range
192.168.1.1 - 192.168.1.254
Subnet Mask
255.255.255.0
Wildcard Mask
0.0.0.255
Hex Mask
0xFFFFFF00
Total / Usable Hosts
256 / 254
CIDR Notation
192.168.1.0/24
IP Class & Type
Class CPrivate

Binary Notation Breakdown

IP Address:11000000.10101000.00000001.00001111
Subnet Mask:11111111.11111111.11111111.00000000
Wildcard Mask:00000000.00000000.00000000.11111111
Network ID:11000000.10101000.00000001.00000000
Broadcast:11000000.10101000.00000001.11111111
Network bitsHost bits

IPv4 Subnet Cheat Sheet & Reference Table

Quick lookup for CIDR prefixes, subnet masks, wildcard masks and host capacity

CIDRSubnet MaskWildcard MaskTotal IPsUsable Hosts
/00.0.0.0255.255.255.2554,294,967,2964,294,967,294
/1128.0.0.0127.255.255.2552,147,483,6482,147,483,646
/2192.0.0.063.255.255.2551,073,741,8241,073,741,822
/3224.0.0.031.255.255.255536,870,912536,870,910
/4240.0.0.015.255.255.255268,435,456268,435,454
/5248.0.0.07.255.255.255134,217,728134,217,726
/6252.0.0.03.255.255.25567,108,86467,108,862
/7254.0.0.01.255.255.25533,554,43233,554,430
/8255.0.0.00.255.255.25516,777,21616,777,214
/9255.128.0.00.127.255.2558,388,6088,388,606
/10255.192.0.00.63.255.2554,194,3044,194,302
/11255.224.0.00.31.255.2552,097,1522,097,150
/12255.240.0.00.15.255.2551,048,5761,048,574
/13255.248.0.00.7.255.255524,288524,286
/14255.252.0.00.3.255.255262,144262,142
/15255.254.0.00.1.255.255131,072131,070
/16255.255.0.00.0.255.25565,53665,534
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122
/32255.255.255.2550.0.0.011

Click any row to load that prefix into the calculator.

How to Use the IPv4 Subnet Calculator

Step-by-step usage and the core subnetting concepts behind every result

Step-by-step instructions

  1. Enter any IPv4 address in the IPv4 Address field, for example 10.0.0.1.
  2. Pick a prefix length or subnet mask from the dropdown, for example /24 — 255.255.255.0. You can also type the prefix straight into the address field (10.0.0.1/22) or add a dotted mask after a space (10.0.0.1 255.255.252.0).
  3. Results update as you type. Press Calculate or Enter to re-run the calculation at any time.
  4. Use the copy icon on any result card to copy the value to your clipboard, or click a row in the cheat sheet to load that prefix.

Core subnetting concepts

Network ID vs broadcast address

The network ID is the first address of a subnet and identifies the subnet itself. The broadcast address is the last address and reaches every host on the subnet. Neither can be assigned to a device, which is why usable hosts are the total minus two.

CIDR notation & subnet masks

Classless Inter-Domain Routing (CIDR) writes the mask as a slash and a number, such as /24. The number is how many leading bits are set to 1 in the 32-bit mask: those bits identify the network, and the remaining bits identify hosts.

Calculating host counts

A subnet with prefix n contains 232−n addresses. Subtract two for the network and broadcast addresses to get usable hosts: a /26 has 64 addresses and 62 usable hosts.

Wildcard masks

A wildcard mask is the inverse of the subnet mask (255 minus each octet). Cisco ACLs and OSPF network statements use it: a 0 bit means “must match” and a 1 bit means “ignore”.

Frequently asked questions

What is an IPv4 subnet calculator?

An IPv4 subnet calculator takes an IP address and a subnet mask or CIDR prefix and works out the subnet it belongs to: the network address, broadcast address, usable host range, number of hosts, wildcard mask and the binary form of each value. Network engineers use it to plan address space and to check router, firewall and server configurations.

What is the difference between a /24 and a /25 subnet?

A /24 subnet (mask 255.255.255.0) contains 256 addresses, of which 254 are usable by hosts. A /25 subnet (mask 255.255.255.128) borrows one more bit for the network, splitting a /24 into two halves of 128 addresses each, with 126 usable hosts per subnet.

What is a wildcard mask and where is it used?

A wildcard mask is the inverse of a subnet mask: subtract each octet of the mask from 255. For example, the wildcard for 255.255.255.0 is 0.0.0.255. Cisco access control lists (ACLs) and OSPF network statements use wildcard masks, where a 0 bit means the address bit must match and a 1 bit means it is ignored.

Which IPv4 address ranges are private (RFC 1918)?

RFC 1918 reserves three ranges for private networks that are not routed on the public internet: 10.0.0.0/8 (10.0.0.0 to 10.255.255.255), 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16 (192.168.0.0 to 192.168.255.255).

Why does a /31 subnet have two usable hosts?

Normally the first and last addresses of a subnet are reserved for the network ID and broadcast. RFC 3021 allows /31 subnets on point-to-point links, where no broadcast address is needed, so both addresses can be assigned to the two router interfaces. A /32 identifies a single host and is commonly used for loopback interfaces and host routes.

More Networking & IP Tools

Free browser-based utilities for network engineers and system administrators

All IT tools
Comments