Subnet calculator
192.168.10.32/27.33 to .62 · 30 hosts · 255.255.255.224
Back to tool
Tested against Python ipaddress on 10,000 IPv4 casesTested on 10,000 cases IPv4 + IPv6 Cloud mode: AWS, Azure, GCP

Subnet Calculator: Network, Broadcast, Host Range and Mask, With the Working Shown

Type an address with a prefix or a mask. The answer updates as you type, and the working shows why.

Calculate
Prefix
/27
Also accepts 192.168.10.37 255.255.255.224. Share the link and the result comes with it.
Standard rules: the network and broadcast addresses are reserved. Switch to a cloud for its rules.

The working

192.168.10.37 in binary
27 network bits5 host bitsinteresting octet: 4th (37)
01/27 means 27 network bits and 5 host bits.
02Block size in the 4th octet: 256 minus 224 = 32.
03Subnets step by 32: .0, .32, .64, .96 and on. 37 sits in the block starting at 32.
04Network 192.168.10.32, broadcast 192.168.10.63. 2^5 minus 2 = 30 hosts.

How do you calculate a subnet?

Short answer

Take the prefix length, for example /27, and work out the block size: 2 to the power of (32 minus 27) equals 32 addresses. Networks start at multiples of 32 in the last octet, so 192.168.10.37/27 sits in 192.168.10.32 to .63. The first address is the network, the last is broadcast, and 30 hosts remain.

Every calculator answer comes from those three moves: find the block size, find the multiple at or below your address, and count to the next one. The binary strip above shows the same thing bit by bit. Everything to the left of the line is fixed by the prefix; everything to the right is free for hosts.

Worked example: 203.0.113.77/26

A /26 leaves 6 host bits, so the block size is 26 = 64. The networks in the last octet are .0, .64, .128 and .192. 77 sits between 64 and 127, so the network is 203.0.113.64, the broadcast is 203.0.113.127, and the 62 usable hosts run from .65 to .126.

203.0.113.0/24 is TEST-NET-3, reserved for documentation by RFC 5737, so it never collides with a real network.

which I often do to find the top and bottom of a given /27
iso1631 · Hacker News · Jul 2022

How many usable hosts are in a subnet?

Short answer

Usable hosts equal 2 to the power of the host bits, minus 2 for the network and broadcast addresses. A /24 has 254, a /26 has 62, a /29 has 6. Exceptions: a /31 point-to-point link uses both addresses, and AWS and Azure reserve 5 addresses per subnet, GCP reserves 4.

The cloud rule is the one that catches people. Plan a /28 for 14 instances on AWS and you will run out at 11. Switch the calculator to Cloud mode before you size a VPC subnet.

usable hostreserved by the network or the cloud
One /28 (16 addresses, last octet .0 to .15), three rule sets. AWS keeps .1 to .3 for the router, DNS and future use, and Azure keeps them for the gateway and DNS; Google Cloud keeps .1 for the gateway and .14 for future use, as well as the network and broadcast. Sources: AWS, Azure, Google Cloud, checked 4 Oct.
The first four IP addresses and the last IP address in each subnet CIDR block are not available for your use
Amazon VPC User Guide · Subnet CIDR blocks

How do you split a network into equal subnets?

Short answer

Borrow host bits. Every bit you add to the prefix doubles the number of subnets and halves their size. Splitting a /24 into 4 equal subnets needs 2 extra bits, so you get four /26 networks of 64 addresses each: .0, .64, .128 and .192.

Subnet divider
4 subnets of /26, 64 addresses each.
#NetworkUsable rangeBroadcastHosts
1192.168.40.0/26192.168.40.1 to .62192.168.40.6362
2192.168.40.64/26192.168.40.65 to .126192.168.40.12762
3192.168.40.128/26192.168.40.129 to .190192.168.40.19162
4192.168.40.192/26192.168.40.193 to .254192.168.40.25562
Showing 4 of 4

How do you plan subnets by host count (VLSM)?

Short answer

List each group with the hosts it needs plus growth, round each up to the next power of two (counting the network and broadcast), then allocate from the largest down. Largest first keeps every block on a clean boundary, so nothing overlaps and the leftover space stays in one piece.

Start with the largest network
Server Fault canonical answer on IPv4 subnetting, part 2 · serverfault.com
VLSM planner
192.168.40.0192.168.40.255
GroupNeedSubnetUsable rangeSpare
Clients97192.168.40.0/25192.168.40.1 to .12629
Servers18 (12 +50%)192.168.40.128/27192.168.40.129 to .15812
Switches9192.168.40.160/28192.168.40.161 to .1745
Allocated 176 of 256 addresses, largest first. 80 left in one contiguous range.

Is this IP in that subnet? Do these blocks overlap?

Short answer

An address belongs to a subnet when it falls between the network and broadcast addresses, which is the same as having identical network bits. Two blocks overlap when one block's range touches the other's. Overlaps break VPNs and site-to-site links, so check every plan before a merger or a new tunnel.

lots and lots of overlapping 10./8 allocations
p_l · Hacker News · Jan 2026
IP in subnet
Yes. 10.20.0.0/21 spans 10.20.0.0 to 10.20.7.255.
Overlap checker
10.0.0.0/16 overlaps 10.0.128.0/17 (contains it).
172.16.0.0/12 overlaps 172.20.0.0/16 (contains it).

How does IPv6 subnetting work?

Short answer

In IPv6 you count /64 networks, not hosts. Every LAN gets a /64 because SLAAC needs it, so a site with a /48 has 65,536 LANs to hand out and a home with a /56 has 256. Point-to-point links use a /127, though some older gear still wants a /126.

IPv6 calculator
Hand out /64s from this block, one per LAN.
Normally I'd use the subnet calculator on MXToolbox's website for convenience but it doesn't support IPv6.
Riverheart · Hacker News · Apr 2023
you need to assign a /126 on PtP links for some gear, instead of a /127
scurvy · Hacker News · Jul 2015

What about /31, /32 and addresses ending in .255?

Short answer

A /31 has no network or broadcast address: RFC 3021 lets both addresses work on point-to-point links. A /32 is one address, used for loopbacks and host routes. An address ending in .255 is only a broadcast when it is the last address of its subnet; inside a /16 it is an ordinary host.

10.0.0.0/31

Point-to-point link

Two usable addresses, .0 and .1, one per router. Saves half the space of a /30.

192.0.2.1/32

Loopback or host route

A single address. Routers use it for stable router IDs that never go down with an interface.

10.0.0.255/16

A valid .255 host

The broadcast of 10.0.0.0/16 is 10.0.255.255. Here .255 is just another host.

/32 means that the network has only a single IPv4 address
Worthwelle · Super User

CIDR to subnet mask table

The rows most exam questions and most office networks use. For the printable /8 to /32 sheet and a way to redraw it from memory, see the subnetting cheat sheet.

CIDRSubnet maskWildcardAddressesUsable
/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
Showing /22 to /32

Private and special IPv4 ranges

The calculator flags these automatically. Private means "not routed on the public internet", not "on this LAN": two companies can both use 10.0.0.0/8, which is exactly why mergers end in renumbering.

BlockWhat it is forRFC
10.0.0.0/8Private network1918
172.16.0.0/12Private network (172.16.0.0 to 172.31.255.255)1918
192.168.0.0/16Private network1918
100.64.0.0/10Shared space for carrier-grade NAT6598
169.254.0.0/16Link-local: a host that got no DHCP answer3927
127.0.0.0/8Loopback1122
192.0.2.0/24Documentation (TEST-NET-1)5737
198.51.100.0/24Documentation (TEST-NET-2)5737
203.0.113.0/24Documentation (TEST-NET-3)5737
224.0.0.0/4Multicast5771
RFC1918 addresses mean "local" network is wrong. It means "private".
profmonocle · Hacker News · Jun 2025

The same answer from the command line

Useful on a jump host with no browser. All three print the network, broadcast and host count for the address in the calculator.

shell: ipcalc
$ ipcalc 192.168.10.37/27
Network:   192.168.10.32/27
Broadcast: 192.168.10.63
Hosts/Net: 30
python3
$ python3 -c "import ipaddress as i; n=i.ip_interface('192.168.10.37/27').network; print(n, n.broadcast_address, n.num_addresses-2)"
192.168.10.32/27 192.168.10.63 30
powershell
PS> ([ipaddress](([ipaddress]'192.168.10.37').Address -band ([ipaddress]'255.255.255.224').Address)).IPAddressToString
192.168.10.32

Questions people ask

What is a /24 subnet?

A /24 has 24 network bits and 8 host bits: 256 addresses, mask 255.255.255.0, and 254 usable hosts. It is the classic office LAN size.

What subnet mask is /17?

255.255.128.0. It holds 32,768 addresses and 32,766 usable hosts. A chatbot once answered this one wrong in a widely shared thread, which is why a deterministic calculator still matters.

How many IPs are in a /16?

65,536 addresses, of which 65,534 are usable hosts. On AWS, 65,531.

Why does AWS show fewer usable IPs?

AWS keeps five addresses in every subnet: the network, the VPC router, DNS, one reserved for future use, and the last address. Azure also keeps five (the network, the gateway, two for DNS and the last address). Google Cloud keeps four.

What is the difference between CIDR and a subnet mask?

They carry the same information. /27 counts the network bits; 255.255.255.224 writes the same 27 ones as four decimal octets.

Can a host address end in .255?

Yes, whenever it is not the last address of its subnet. 10.0.0.255 is a normal host in 10.0.0.0/16.

Is 172.16.0.0/12 private?

Yes. RFC 1918 reserves 172.16.0.0 to 172.31.255.255 for private networks. 172.32.0.0 is public.

Practice

Can you do it without the calculator?

Exams give you a whiteboard, not a browser. The subnetting practice generator gives unlimited questions with the same binary working, and when you are ready for the full exam format, try these Network+ practice questions.

Sources

  1. CompTIA Network+ exam objectives, CompTIA
  2. RFC 4632, Classless Inter-domain Routing (CIDR), IETF
  3. RFC 1918, Address Allocation for Private Internets, IETF
  4. RFC 3021, Using 31-Bit Prefixes on IPv4 Point-to-Point Links, IETF
  5. RFC 5737, IPv4 Address Blocks Reserved for Documentation, IETF
  6. RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Space, IETF
  7. RFC 4291, IP Version 6 Addressing Architecture, IETF
  8. IPv4 Special-Purpose Address Registry, IANA
  9. How does IPv4 subnetting work? Server Fault
  10. Subnet CIDR blocks, Amazon VPC User Guide
  11. Virtual Network FAQ, Microsoft Learn
  12. Subnets, Google Cloud VPC

Changelog

  • 4 Oct: cloud reserved-address rules checked against the AWS, Azure and Google Cloud docs.
  • 4 Oct: engine re-run against Python ipaddress: 10,000 IPv4 and 2,000 IPv6 cases, plus /0, /30, /31 and /32 for IPv4 and /0, /127 and /128 for IPv6.
  • First published with IPv6, VLSM and overlap checks.