IPv4 Subnet Calculator — CIDR, Netmask & IP Range
Prefix is optional — without it, /24 is assumed. Try 10.0.0.55/22 or 172.16.5.9/28.
Binary view
| Address | 11000000.10101000.00000001.10000010 | 192.168.1.130 |
| Netmask | 11111111.11111111.11111111.11000000 | 255.255.255.192 |
| Network | 11000000.10101000.00000001.10000000 | 192.168.1.128 |
Highlighted bits are the network portion (26 bits); dimmed bits are the host portion.
About the Subnet Calculator
Subnet Calculator turns an address like 192.168.1.130/26 into everything you actually need: the network address, broadcast address, subnet mask and wildcard mask, the first and last usable host, and how many hosts the subnet holds. The binary view of the address and mask makes it easy to see why the ranges fall where they do.
It is the fastest way to answer everyday questions: “Is this IP inside that subnet?”, “What mask do I need for 60 hosts?” or “What range does the router DHCP hand out?”. The calculator runs entirely in your browser — nothing is sent anywhere.
How to use the Subnet Calculator
- Type an IP address with its prefix, for example 10.0.0.55/22 or 192.168.1.130/26.
- Press Calculate (or Enter) — every property of the subnet appears instantly.
- Use the CIDR reference table below to pick a prefix size for a required number of hosts.
How IPv4 subnetting works
An IPv4 address is 32 bits. The prefix length /n says how many leading bits are fixed as the network portion. Network address = IP AND netmask (all host bits set to 0) Broadcast address = IP OR wildcard (all host bits set to 1) First host = network + 1 (for /1–/30) Last host = broadcast − 1 Usable hosts = 2^(32−n) − 2 (the −2 exclude network & broadcast) Example 192.168.1.130/26: netmask 255.255.255.192 → block size 64 → subnets at .0, .64, .128, .192 .130 falls into the .128 block → network 192.168.1.128, broadcast .191 usable hosts 192.168.1.129 – 192.168.1.190 (62 hosts)
Frequently asked questions
What does /24 mean?
It is CIDR notation for the prefix length: 24 of the 32 bits are the network part, giving the mask 255.255.255.0 and 254 usable host addresses (2^8 − 2).
Why are two addresses subtracted from every subnet?
The first address of a subnet (all host bits 0) identifies the network itself, and the last (all host bits 1) is the broadcast address. Neither can be assigned to a device, except in /31 point-to-point and /32 host routes.
Which prefix fits 100 hosts?
You need 100 + 2 = 102 addresses → 2^7 = 128 → a /25 (mask 255.255.255.128, 126 usable hosts). The CIDR table in the reference section lists host counts for every prefix.
Does this work with IPv6?
This calculator covers IPv4. IPv6 subnets are almost always /64 per LAN, and the arithmetic is simpler: the host portion is the entire lower 64 bits.
Related tools
DNS Lookup
DNS Lookup queries the public DNS records of any domain: where its website lives (A and AAAA), who handles its email (MX),…
Internet Speed Test
Click Start and this test measures four things in about 20 seconds: your download throughput, your upload throughput, your…
Base64 Encoder / Decoder
Base64 represents binary data using 64 safe ASCII characters, which is how emails attach files, JSON carries binary blobs and…
UUID Generator
A UUID (universally unique identifier) is a 128-bit ID like 3f8a2c1e-9b4d-4e6a-8f2b-1c9d8e7f6a5b.
HEX to RGB Color Converter
Enter a color in any format — #0d9488, rgb(13,148,136) or hsl(174,84%,32%) — and this tool converts it to the other two…