CIDR Calculator - IPv4 & IPv6 Subnet Calculator
| Network | 192.168.1.0/24 | |
|---|---|---|
| Broadcast | 192.168.1.255 | |
| First host | 192.168.1.1 | |
| Last host | 192.168.1.254 | |
| Usable hosts | 254 | |
| Total addresses | 256 | |
| Netmask | 255.255.255.0 | |
| Wildcard | 0.0.0.255 | |
| Prefix length | /24 |
| Subnet | Range | Hosts |
|---|---|---|
| 192.168.1.0/26 | 192.168.1.1 – 192.168.1.62 | 62 |
| 192.168.1.64/26 | 192.168.1.65 – 192.168.1.126 | 62 |
| 192.168.1.128/26 | 192.168.1.129 – 192.168.1.190 | 62 |
| 192.168.1.192/26 | 192.168.1.193 – 192.168.1.254 | 62 |
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./30and/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
Epoch / Unix Timestamp Converter
Convert between Unix epoch timestamps and human-readable dates.
Regex Tester
Test regular expressions against text with match highlighting.
UUID Generator
Generate random v4 UUIDs for use in databases and APIs.
Colour Converter
Convert colours between HEX, RGB, and HSL formats.