We Value Your Privacy

We use cookies to enhance your browsing experience and analyze site traffic. All calculations happen locally in your browser - we never see or store your data. Learn more in our Privacy Policy

/
/
CalculateYogi
  1. Home
  2. Technology
  3. Subnet Calculator
Technology

Subnet Calculator

Find the network and broadcast address, subnet mask, host range and usable host count for any IPv4 subnet, and plan unequal subnets with VLSM.

Common scenarios
What do you want to do?

Prefix reference — /0 to /32

Usable hosts exclude the network and broadcast addresses, except at /31 and /32 where RFC 3021 makes every address a host.

PrefixSubnet maskAddressesUsable hosts
/00.0.0.04,294,967,2964,294,967,294
/1128.0.0.02,147,483,6482,147,483,646
/2192.0.0.01,073,741,8241,073,741,822
/3224.0.0.0536,870,912536,870,910
/4240.0.0.0268,435,456268,435,454
/5248.0.0.0134,217,728134,217,726
/6252.0.0.067,108,86467,108,862
/7254.0.0.033,554,43233,554,430
/8255.0.0.016,777,21616,777,214
/9255.128.0.08,388,6088,388,606
/10255.192.0.04,194,3044,194,302
/11255.224.0.02,097,1522,097,150
/12255.240.0.01,048,5761,048,574
/13255.248.0.0524,288524,286
/14255.252.0.0262,144262,142
/15255.254.0.0131,072131,070
/16255.255.0.065,53665,534
/17255.255.128.032,76832,766
/18255.255.192.016,38416,382
/19255.255.224.08,1928,190
/20255.255.240.04,0964,094
/21255.255.248.02,0482,046
/22255.255.252.01,0241,022
/23255.255.254.0512510
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.25422
/32255.255.255.25511

Reserved IPv4 ranges (IANA)

From the IANA IPv4 Special-Purpose Address Registry. "Globally reachable" is IANA's own column, and it is the honest replacement for a private/public flag — 127.0.0.1 is reserved, but it is loopback, not private use.

BlockPurposeDefined byGlobally reachable
0.0.0.0/32"This host on this network"RFC 1122No
0.0.0.0/8"This network"RFC 791No
10.0.0.0/8Private useRFC 1918No
100.64.0.0/10Shared address space (carrier-grade NAT)RFC 6598No
127.0.0.0/8LoopbackRFC 1122No
169.254.0.0/16Link localRFC 3927No
172.16.0.0/12Private useRFC 1918No
192.0.0.0/24IETF protocol assignmentsRFC 6890No
192.0.2.0/24Documentation (TEST-NET)RFC 5737No
192.31.196.0/24AS112-v4RFC 7535Yes
192.52.193.0/24AMT relayRFC 7450Yes
192.88.99.0/24Deprecated 6to4 relay anycastRFC 7526No
192.168.0.0/16Private useRFC 1918No
192.175.48.0/24Direct delegation AS112 serviceRFC 7534Yes
198.18.0.0/15BenchmarkingRFC 2544No
198.51.100.0/24Documentation (TEST-NET)RFC 5737No
203.0.113.0/24Documentation (TEST-NET)RFC 5737No
224.0.0.0/4MulticastRFC 5771No
240.0.0.0/4ReservedRFC 1112No
255.255.255.255/32Limited broadcastRFC 8190No
Did this calculator solve your problem today?

Contributor

Reviewed by

Last updated: September 13, 2026
SupportI build these free tools with love, late nights, and way too much coffee. If this calculator helped you, a small donation would mean the world to me and help keep this site running. Thank you for your kindness!

Related Calculators

You might also find these calculators useful

CIDR Calculator

Convert CIDR to a range, split a block, or aggregate blocks

IPv6 Subnet Calculator

Prefix, address range, /64 count and IANA address type

NAT Port Exhaustion Calculator

SNAT port utilisation, per instance or per pool

MTU Calculator

Effective MTU and TCP MSS from real protocol overhead

Subnet Calculator

Enter an IPv4 address and a prefix — or paste a block like 192.168.1.0/24 — and this calculator returns the network and broadcast addresses, the subnet mask and its wildcard, the usable host range and the host count, plus the same address written as an integer, in hexadecimal, in binary, as a reverse-DNS name and as an IPv6 mapping. Switch to VLSM mode to divide a network into subnets of different sizes.

What is subnetting?

An IPv4 address is 32 bits. A prefix length says how many of those bits identify the network, leaving the rest to identify hosts inside it. Bitwise-ANDing the address with the mask gives the network address; setting every host bit gives the broadcast address. Everything between them is available to hosts — with one exception worth knowing: RFC 3021 makes both addresses of a 31-bit prefix usable, because a point-to-point link has no broadcast to reserve.

Usable hosts in a subnet

How to use this calculator

1

2

3

4

5

When you need a subnet calculator

Sizing a new VLAN

Turn "about 40 devices" into a prefix: a /26 gives 62 usable hosts, a /27 only 30. The reference table makes the next size up obvious.

Splitting a site by function

Divide one /24 into subnets for staff, printers, cameras and guest wifi, each sized to its own requirement rather than all four the same.

Reading a firewall rule

Work out exactly which addresses 10.20.0.0/18 covers before you write a rule that permits it — or before you trust one somebody else wrote.

Numbering router links

A link between two routers needs two addresses. A /30 spends four to deliver two; a /31 delivers the same two from a block half the size.

Why subnet at all?

Addresses are finite

Giving every site a /16 wastes 65,534 addresses on a twelve-person office. Sizing each subnet to its host count is how a private range lasts.

Broadcast traffic is contained

Every host in a subnet sees its broadcast traffic. Splitting a flat network into smaller subnets keeps that noise local instead of letting it reach every device.

Boundaries are where policy lives

Firewall rules, access lists and routing policy are written against subnets. A subnet per function gives you somewhere to attach a rule.

Routing tables stay small

Contiguous subnets can be summarised into one advertised route, so neighbouring routers carry one entry instead of sixteen.

Subnetting questions

254. A /24 holds 256 addresses; the first is the network address and the last is the broadcast address, so 254 are left for hosts. The same subtraction applies from /0 through /30 — the reference table on this page lists every prefix.

Because there is nothing to reserve. RFC 3021 states that on a 31-bit prefix the two addresses "MUST be interpreted as host addresses", since a point-to-point link has no broadcast. Subtracting two would leave a link with no addresses at all, which is why /31 is the exception to the usual rule.

No — it is loopback, reserved by RFC 1122, and that is a different thing. Private-use space is 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 under RFC 1918: addresses you can assign to real hosts that simply are not routed on the public internet. A loopback address never leaves the machine. This calculator reports the reserved range by name rather than collapsing everything into private-or-public.

This page answers questions about one network: what is in it, and how do I divide it. A CIDR calculator answers questions about how blocks compose — converting notation to an address range, decomposing an arbitrary range into aligned blocks, and aggregating several blocks into one supernet. Both use the same arithmetic; they differ in what you start with and what you want back.

Variable-length subnet masking: giving each subnet the mask its own host count needs instead of one mask for all of them. A site with a 50-host floor, a 25-host floor and a two-address router link uses a /26, a /27 and a /31 rather than three /26s. Allocate the largest requirement first — a block has to start on a multiple of its own size, so placing a small subnet early can strand the alignment a larger one needs.

The subnet mask with every bit inverted, so 255.255.255.0 becomes 0.0.0.255. Cisco access lists and OSPF area statements take a wildcard mask where other tools take a subnet mask, and writing one where the other is expected is a common and quiet mistake. This calculator shows both.

CalculateYogi

The most comprehensive calculator web app. Free, fast, and accurate calculators for everyone.

Calculator Categories

  • Math
  • Finance
  • Health
  • Conversion
  • Date & Time
  • Statistics
  • Science
  • Engineering
  • Business
  • Everyday
  • Construction
  • Education
  • Technology
  • Food & Cooking
  • Sports
  • Climate & Environment
  • Agriculture & Ecology
  • Social Media
  • Other

Company

  • About
  • Contact
  • Contributors

Legal

  • Privacy Policy
  • Terms of Service
  • Editorial Policy

© 2026 CalculateYogi. All rights reserved.

Sitemap

Made with by the AppsYogi team