Subnet calculator
Work out the network, broadcast and usable range of any CIDR block, and split it into smaller ones.
Results for 10.0.1.0/24
Private-Use · RFC 1918
Room for 254 hosts
10.0.1.0/24 is a private range — perfect for internal networks, never routed on the public internet.
256 addresses in total
The first 24 bits name the network; the last 8 are for hosts.
/24 · wildcard 0.0.0.255
Broadcast 10.0.1.255
Addresses
- CIDR
10.0.1.0/24- Network address
10.0.1.0- Netmask
255.255.255.0- Wildcard mask
0.0.0.255- Broadcast
10.0.1.255- First address
10.0.1.0- Last address
10.0.1.255- First usable
10.0.1.1- Last usable
10.0.1.254- Total addresses
256- Usable addresses
254- Host bits
- 8
- Historic class
- A (obsolete since CIDR)
- Reverse DNS zone
1.0.10.in-addr.arpa
Other forms
- Network (binary)
00001010.00000000.00000001.00000000- Netmask (binary)
11111111.11111111.11111111.00000000- Network (hex)
0x0a000100- Netmask (hex)
0xffffff00- Network (integer)
167772416- Last address (integer)
167772671
Inside IPv6 transition prefixes
- IPv4-mapped
::ffff:10.0.1.0/120- 6to4
2002:a00:100::/40- NAT64
64:ff9b::10.0.1.0/120
Cloud
AWS reserved addresses
- Reserved per subnet
- 5
- Usable after reservation
251- First usable
10.0.1.4- Last usable
10.0.1.254
AWS reserves the first four addresses (network, VPC router, DNS, future use) and the last (broadcast).
Structured result (JSON) · 1.4 KB
{
"version": 4,
"cidr": "10.0.1.0/24",
"network": "10.0.1.0",
"prefix": 24,
"form": "cidr",
"address": "10.0.1.0",
"hostBitsSet": false,
"netmask": "255.255.255.0",
"wildcard": "0.0.0.255",
"broadcast": "10.0.1.255",
"firstAddress": "10.0.1.0",
"lastAddress": "10.0.1.255",
"firstUsable": "10.0.1.1",
"lastUsable": "10.0.1.254",
"totalAddresses": "256",
"hostBits": 8,
"usableAddresses": "254",
"usableRule": "standard",
"addressType": {
"kind": "private",
"name": "Private-Use",
"rfc": "RFC 1918",
"block": "10.0.0.0/8",
"isPublic": false
},
"ipClass": "A",
"binary": {
"network": "00001010.00000000.00000001.00000000",
"netmask": "11111111.11111111.11111111.00000000"
},
"hex": {
"network": "0x0a000100",
"netmask": "0xffffff00"
},
"integer": {
"network": "167772416",
"last": "167772671"
},
"reverseZone": "1.0.10.in-addr.arpa",
"embedded": {
"ipv4Mapped": "::ffff:10.0.1.0/120",
"sixToFour": "2002:a00:100::/40",
"nat64": "64:ff9b::10.0.1.0/120"
},
"notes": [],
"warnings": [],
"cloud": {
"mode": "aws",
"reserved": 5,
"usableAddresses": "251",
"firstUsable": "10.0.1.4",
"lastUsable": "10.0.1.254",
"note": "AWS reserves the first four addresses (network, VPC router, DNS, future use) and the last (broadcast).",
"warnings": []
}
}What the calculator gives you
Type a network such as 10.0.0.0/22 and you get what you need to configure or document it: the network and broadcast addresses, the first and last usable host, how many addresses and usable hosts it holds, the subnet mask and its inverse (the wildcard mask), the type of address and the reverse DNS zone. A bit-by-bit view shows where the network part ends and the host part begins. IPv6 works too, with exact counts even when they are too big for a spreadsheet.
The calculation is plain arithmetic and never contacts the network you enter. The text itself is sent to our server to be calculated. It is not written to logs and is held in memory for at most a day. On the website, Google Analytics also records what you enter, as the privacy policy explains. If you want to keep an internal plan fully offline, Python's ipaddress module does the same sums.
How to use it
- Enter a networkUse CIDR (
192.168.10.0/26), an address with a netmask (192.168.10.5 255.255.255.192), an address with a wildcard (192.168.10.5 0.0.0.63), a range that is exactly one block, or a single address. IPv6 works the same way:2001:db8::/48. - Split it if you need toUnder More options, choose a longer prefix, say
/28, to carve the network into equal subnets. Large splits come back 256 rows at a time. - Account for the cloudPick AWS, Azure or Google Cloud to subtract the addresses that provider reserves in every subnet. This works for IPv4 only, and the result warns you if the subnet is a size the provider does not allow, such as smaller than a
/28in AWS.
Reading the numbers
| Prefix | Netmask | Total | Usable hosts |
|---|---|---|---|
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /24 | 255.255.255.0 | 256 | 254 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 (point-to-point) |
| /32 | 255.255.255.255 | 1 | 1 (single host) |
- Network address is the first address and names the subnet. In IPv4 the broadcast address is the last one. Neither is a host.
- Usable hosts are the total minus those two, except for
/31(RFC 3021) and/32, where the rule changes. - IPv6 has no broadcast address. The calculator takes off only the first address of the subnet, which is reserved as the subnet-router anycast address (RFC 4291 section 2.6.1). A
/64shows 18,446,744,073,709,551,615 usable out of 18,446,744,073,709,551,616. On a/127both addresses count, and a/128is a single host. - Wildcard mask is the netmask inverted, as used in Cisco access lists and OSPF network statements.
- Host bits set. If you type
10.0.0.77/24, the calculator tells you the network is10.0.0.0/24and notes that your address had host bits set. - Reverse DNS zone. It is shown when the prefix falls on an octet (IPv4) or hex digit (IPv6) boundary. For IPv4 blocks that do not, the result points you to RFC 2317.
- Classes (A to E) are shown for reference only. CIDR replaced classful addressing in 1993.
Common mistakes
- Assigning the network or broadcast address to a host. In a
/24,.0and.255are not usable. - Counting cloud subnets like physical ones. AWS and Azure reserve five addresses per subnet and Google Cloud reserves four, so a
/28with 14 usable hosts on paper has 11 in AWS. - Using a /64 for a point-to-point link. It works, but it leaves the link open to neighbour-discovery exhaustion, where a flood of lookups fills a router's tables, so RFC 6164 recommends
/127for router-to-router links. - Using anything other than a /64 for a SLAAC LAN. SLAAC, the way IPv6 devices configure their own addresses, expects 64 host bits.
- Overlapping subnets. Split the parent into equal pieces and allocate from the list, and nothing overlaps. For uneven needs, allocate the largest subnet first.
- Confusing masks. A netmask is ones from the left, then zeros, like
255.255.255.192, and a wildcard is the reverse. A mask with gaps, such as255.0.1.0, is neither and is rejected.
How it is calculated
Addresses are parsed into exact integers (BigInt for IPv6). The prefix length defines a mask of that many leading ones, and the network is the address ANDed with the mask. The last address is the network ORed with the inverted mask. Total addresses are two raised to the number of host bits, usable hosts follow the rules above, and the address type is matched against the IANA special-purpose registries. No floating-point maths is involved, so large IPv6 counts are exact.
For a range that does not line up with a single block, use the range to CIDR converter. To shorten or spell out a long IPv6 address, see IPv6 compress and IPv6 expand.
Standards
- RFC 4632: classless inter-domain routing (CIDR). RFC 950: the original subnetting standard.
- RFC 3021:
/31point-to-point links in IPv4. RFC 6164:/127links in IPv6. - RFC 4291: IPv6 addressing, including the 64-bit interface identifier and the subnet-router anycast address.
- RFC 2317: reverse DNS for blocks that do not fall on an octet boundary.
- RFC 1918, RFC 6598, RFC 5737, RFC 6890: private, shared, documentation and special-purpose ranges.
Questions people ask
How many usable hosts are in a /24?
A /24 has 254 usable hosts. It holds 256 addresses, and the first is the network address while the last is the broadcast address, which leaves 254 for hosts. Every step down in prefix length doubles the count, so a /23 has 510 and a /25 has 126.
What is the difference between a subnet mask and a wildcard mask?
They are inverses of each other. As a subnet mask, 255.255.255.0 marks the network part. As a wildcard, 0.0.0.255 marks the host part, which is the form many router access lists expect. The calculator shows both for every IPv4 network, and accepts either one in place of a prefix length.
Why does AWS give me fewer addresses than the calculator says?
AWS reserves five addresses in every subnet: the network address, the VPC router, the DNS server, one held for future use and the broadcast address. Azure also reserves five and Google Cloud four. Choose the provider under More options to see the real count for each subnet.
How do I split a network into smaller subnets?
Choose a longer prefix than the network has. Splitting a /24 into /26 subnets gives four, each with 62 usable hosts. Every extra bit in the prefix doubles the number of subnets and halves their size, and you can page through large splits 256 rows at a time.
Why does a /31 have two usable addresses?
On a point-to-point link there is no need for a network or broadcast address, so both addresses can be used by the two routers. RFC 3021 allows this for IPv4 /31 networks, and the calculator counts them that way. RFC 6164 does the same for IPv6 /127 links.
Does it handle IPv6?
Yes. Enter any IPv6 prefix and you get the exact size, the first and last address and the reverse DNS zone. IPv6 has no broadcast address, so on an ordinary subnet the only address taken off the usable count is the first one, the subnet-router anycast address.
Is anything sent to your servers?
Yes. The calculation runs on our server, whether you use the web page, the API or an AI assistant. The input is not written to logs and is held in memory for at most a day. On the website, Google Analytics also records what you enter, so see the privacy policy for the details and how to opt out.
Use it from AI, the API or the command line
Every LookupOwl tool is also a free API and an MCP tool, with no key and no account. This one is subnet_calculate. Please be kind to the rate limits.
curl "https://lookupowl.com/api/v1/tools/subnet-calculator?q=10.0.0.0%2F22"claude mcp add --transport http lookupowl https://lookupowl.com/mcp