CIDR calculator

Get any IPv4 block's range, netmask and usable hosts. Then split it into subnets, each with its own gateway and netmask. Pick the block before you build: a network's CIDR is hard to change later.

65,536 addresses
00001010.00000000.00000000.00000000
16 network bits · 16 host bits
Network
10.0.0.0/16
Usable range
10.0.0.1 – 10.0.255.254
Broadcast
10.0.255.255
Usable hosts
65,534
Netmask
255.255.0.0
Wildcard
0.0.255.255
Total addresses
65,536
Type
Private (RFC 1918)
256 subnets, 254 usable hosts each
  • 10.0.0.0/24Gateway: 10.0.0.1Usable: 10.0.0.1 – 10.0.0.254Netmask: 255.255.255.0
  • 10.0.1.0/24Gateway: 10.0.1.1Usable: 10.0.1.1 – 10.0.1.254Netmask: 255.255.255.0
  • 10.0.2.0/24Gateway: 10.0.2.1Usable: 10.0.2.1 – 10.0.2.254Netmask: 255.255.255.0
  • 10.0.3.0/24Gateway: 10.0.3.1Usable: 10.0.3.1 – 10.0.3.254Netmask: 255.255.255.0
  • 10.0.4.0/24Gateway: 10.0.4.1Usable: 10.0.4.1 – 10.0.4.254Netmask: 255.255.255.0
  • 10.0.5.0/24Gateway: 10.0.5.1Usable: 10.0.5.1 – 10.0.5.254Netmask: 255.255.255.0
  • 10.0.6.0/24Gateway: 10.0.6.1Usable: 10.0.6.1 – 10.0.6.254Netmask: 255.255.255.0
  • 10.0.7.0/24Gateway: 10.0.7.1Usable: 10.0.7.1 – 10.0.7.254Netmask: 255.255.255.0

How to read your result

  • Usable hosts is every address minus two: the first is the network address and the last is the broadcast address, so a /24 has 256 addresses and 254 usable hosts. Two prefixes break the rule. In a /31, both addresses are hosts on a point-to-point link (RFC 3021), so it has 2. A /32 is one host.
  • Type says which range the block sits in. Use a private range (RFC 1918) for a VPC or office network: 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16. Watch the middle one: it ends at 172.31.255.255, so 172.32.0.0 is a public address someone else owns. "Shared address space" (100.64.0.0/10) belongs to carriers doing NAT, so keep it out of your own plans too.
  • Address with host bits set. Type 10.0.0.5/24 and the calculator tells you it's in 10.0.0.0/24, then shows that network. A bare address with no prefix is read as a /32.

IP range to CIDR

Type a range as two addresses with a dash, like 10.0.0.5 - 10.0.1.10. A block always starts on a multiple of its own size, so most ranges don't fit one block. You get the fewest blocks that cover the range exactly: that one takes ten, from 10.0.0.5/32 to 10.0.1.10/32. That's the list a firewall rule or an allow list wants.

Plan a VPC with the subnet calculator

Take a VPC at 10.0.0.0/16 and split it into /24s: 256 subnets of 254 usable hosts. Use the first three for your web, app and database tiers, and leave the rest for whatever comes next. It's a dull plan, and that's the point: the third octet tells you which tier an address is in, and there's room for 253 more.

A 10.0.0.0/16 VPC split into three /24 tiersThe VPC holds 65,536 addresses. Three tiers use 10.0.0.0/24 (web), 10.0.1.0/24 (app) and 10.0.2.0/24 (database), each with 254 usable hosts, netmask 255.255.255.0 and its gateway on the .1 address. 253 more /24 blocks are left for later tiers.VPC 10.0.0.0/1665,536 addressesweb10.0.0.0/24gateway 10.0.0.1 · 254 usable hostsapp10.0.1.0/24gateway 10.0.1.1 · 254 usable hostsdatabase10.0.2.0/24gateway 10.0.2.1 · 254 usable hostsfree10.0.3.0 to 10.0.255.255253 more /24sEach tier: netmask 255.255.255.0Gateway and netmask: the fields in Add Tier.

On American Cloud, you create the VPC with its CIDR, then add a tier per subnet. Each tier asks for a gateway and a netmask, and those are the Gateway and Netmask columns the calculator gives you. The gateway is the subnet's first usable address, so the web tier above gets 10.0.0.1 and 255.255.255.0.

Give every network you'll connect a block that doesn't overlap the others. Two networks both on 10.1.1.0/24 can't be joined without IP conflicts, and the fix is a new network.

Leave headroom in each subnet, too. Some clouds keep addresses for themselves. AWS, for example, holds back five in every subnet (the network address, the next three for its router, DNS and future use, and the last one) and allows subnets from /16 to /28, so a /28 there has 11 usable addresses, not 14.

Subnet cheat sheet

Every prefix length from /32 to /0, with its netmask, wildcard mask and size. The usable hosts column uses the same rules as the calculator, /31 and /32 included.

Prefix
Netmask
Wildcard
Addresses
Usable hosts
/32
255.255.255.255
0.0.0.0
1
1 (one host)
/31
255.255.255.254
0.0.0.1
2
2 (point-to-point)
/30
255.255.255.252
0.0.0.3
4
2
/29
255.255.255.248
0.0.0.7
8
6
/28
255.255.255.240
0.0.0.15
16
14
/27
255.255.255.224
0.0.0.31
32
30
/26
255.255.255.192
0.0.0.63
64
62
/25
255.255.255.128
0.0.0.127
128
126
/24
255.255.255.0
0.0.0.255
256
254
/23
255.255.254.0
0.0.1.255
512
510
/22
255.255.252.0
0.0.3.255
1,024
1,022
/21
255.255.248.0
0.0.7.255
2,048
2,046
/20
255.255.240.0
0.0.15.255
4,096
4,094
/19
255.255.224.0
0.0.31.255
8,192
8,190
/18
255.255.192.0
0.0.63.255
16,384
16,382
/17
255.255.128.0
0.0.127.255
32,768
32,766
/16
255.255.0.0
0.0.255.255
65,536
65,534
/15
255.254.0.0
0.1.255.255
131,072
131,070
/14
255.252.0.0
0.3.255.255
262,144
262,142
/13
255.248.0.0
0.7.255.255
524,288
524,286
/12
255.240.0.0
0.15.255.255
1,048,576
1,048,574
/11
255.224.0.0
0.31.255.255
2,097,152
2,097,150
/10
255.192.0.0
0.63.255.255
4,194,304
4,194,302
/9
255.128.0.0
0.127.255.255
8,388,608
8,388,606
/8
255.0.0.0
0.255.255.255
16,777,216
16,777,214
/7
254.0.0.0
1.255.255.255
33,554,432
33,554,430
/6
252.0.0.0
3.255.255.255
67,108,864
67,108,862
/5
248.0.0.0
7.255.255.255
134,217,728
134,217,726
/4
240.0.0.0
15.255.255.255
268,435,456
268,435,454
/3
224.0.0.0
31.255.255.255
536,870,912
536,870,910
/2
192.0.0.0
63.255.255.255
1,073,741,824
1,073,741,822
/1
128.0.0.0
127.255.255.255
2,147,483,648
2,147,483,646
/0
0.0.0.0
255.255.255.255
4,294,967,296
4,294,967,294

How the calculation works

An IPv4 address is 32 bits, and the prefix says how many of them, from the left, name the network (RFC 4632). The netmask is that many 1 bits, and the wildcard is the same mask flipped. The network address is your address with the host bits set to 0, and the broadcast address has them all set to 1. The block holds 2 to the power of (32 minus the prefix) addresses. The bar at the top of the result shows the split, bit by bit.

Everything runs in your browser. The math and the address types were checked on October 15, 2026 against RFC 4632, RFC 1918, RFC 3021, RFC 6598, RFC 5771, and the IANA special-purpose address registry. The AWS numbers come from AWS's subnet sizing docs. It handles IPv4 only.

Questions

Can I change a network's CIDR later?

Not easily. On American Cloud, CIDR changes are restricted once IP reservations exist or when the new block isn't a valid subset of the old one. It's usually more practical to create a new network with the right block, so plan the block and its subnets before you build.

Is a CIDR calculator the same as a subnet calculator?

Yes, they're two names for the same job. Both take an address and a prefix length or netmask and give you the network, broadcast, usable host range, host count, netmask and wildcard. This one also turns an IP range into CIDR blocks and splits a block into subnets, listing a gateway for each.

Build it on American Cloud

A VPC on American Cloud is $12 a month, flat. If something doesn't connect the way you planned, our support team's median reply time is under 2 minutes. Need to check a domain while you're at it? Try the DNS lookup, or see pricing.