Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. Web Tools
  3. Subnet Calculator
Add to favorites

Subnet Calculator

Network, broadcast, host range, masks and counts for any IPv4 or IPv6 block, plus split, merge, contains and range to CIDR.

Runs locally in your browserMore web toolsJump to full guide
Related readingSubnetting Made Simple: Understanding IP Addresses and CIDR Notation12 min

Initializing in your browser…

You might also like

What's My IP

See the public IP address websites see, copy it in one click, and check the approximate location and network operator behind it.

Pomodoro Timer

Focus in 25 minute sessions with short and long breaks, adjustable lengths, a chime, and today's focus count kept in your browser.

CSR Generator

Generate a certificate signing request and private key in your browser, with SANs and RSA or ECDSA keys, checked before you send it to a CA.

Subnet Calculator: a worked example

A colleague hands you 172.16.5.5/12 and asks whether it is routable, how big the block is and where it ends. Then you need a firewall rule for 192.168.1.5 through 192.168.1.20.

Typed

172.16.5.5/12
Range: 192.168.1.5 to 192.168.1.20
What Subnet Calculator produces

What the calculator shows

172.16.5.5 is in 172.16.0.0/12: Private use (RFC 1918)
172.16.5.5 has bits set below the /12 boundary; the results describe 172.16.0.0/12

Addresses      1,048,576
Usable hosts   1,048,574
Network        172.16.0.0
Broadcast      172.31.255.255
First host     172.16.0.1
Last host      172.31.255.254
Netmask        255.240.0.0
Wildcard       0.15.255.255

16 addresses, covered exactly by 5 blocks:
192.168.1.5/32
192.168.1.6/31
192.168.1.8/29
192.168.1.16/30
192.168.1.20/32

A /12 leaves 32 - 12 = 20 host bits, so the block holds 2^20 = 1,048,576 addresses; removing the network and broadcast addresses leaves 1,048,574 hosts. The netmask is twelve ones, which is 255.240.0.0, and the wildcard is its inverse. The address is private because it falls inside the RFC 1918 block 172.16.0.0/12. The range needs five blocks because CIDR blocks must start on a multiple of their own size: .5 can only be a single address, .6 and .7 form a /31, .8 to .15 a /29, .16 to .19 a /30, and .20 is a single address again.

About the Subnet Calculator

Type an IPv4 or IPv6 address with a prefix and get the network, broadcast, host range, netmask, wildcard and exact address counts at once. The same page splits a block into smaller subnets, checks whether an address is inside a block, merges a list of blocks, and turns any first-to-last range into CIDR.

Key features

  • IPv4 and IPv6, with prefixes or dotted netmasks
  • Network, broadcast, first and last host, netmask, wildcard and expanded IPv6 form, each copyable
  • Exact address and host counts for any size, including /31 and /32 rules
  • Names private, shared, loopback, link-local, documentation and other special ranges with their RFC
  • Split a block into equal subnets
  • Check whether an address is inside a block
  • Merge a list of blocks into the fewest equivalent ones
  • Convert a first and last address into CIDR blocks
  • Binary view of the network and mask
  • Shareable links with your settings

How to use

  1. 1Type an address with a prefix, such as 192.168.1.130/24, or press an example.
  2. 2Move the prefix slider to see how the block grows or shrinks.
  3. 3Read the counts and copy the network, broadcast, host range or masks you need.
  4. 4Switch to Split, Contains, Merge or Range for the other calculations.
  5. 5Click a block in any result list to open it in the Subnet view.

What the calculator works out

One block, every fact. Enter something like 192.168.1.130/24, 10.0.0.0/255.0.0.0 or 2001:db8::1/64. The calculator masks off the host bits to find the network, then lists the CIDR, network address, broadcast address (IPv4 only), first and last usable host, netmask and wildcard mask, each with a copy button, plus the number of addresses and usable hosts. If the address you typed has host bits set, as 192.168.1.130/24 does, it says so and describes the block the address belongs to, 192.168.1.0/24. A bare address with no prefix is shown inside its /24 (IPv4) or /64 (IPv6), and the prefix slider moves the boundary one bit at a time.

Usable hosts, by the rules. In an ordinary IPv4 block the first address names the network and the last is the broadcast address, so a /24 has 256 addresses and 254 hosts. Two cases are different and the calculator follows the standards: a /31 on a point-to-point link has two usable addresses and no broadcast (RFC 3021), and a /32 is a single host. IPv6 has no broadcast at all, so every address in a block counts, and the counts are exact however large the block: a /64 holds 18,446,744,073,709,551,616 addresses.

Special ranges named. Every address is looked up in the IANA special-purpose registries for IPv4 and IPv6. The result says whether the address is private (RFC 1918), shared carrier-grade NAT space (100.64.0.0/10), loopback, link-local, documentation, multicast or another reserved block, with the RFC that defines it, and whether packets to it cross the public Internet. The check uses the address you typed, so 172.16.5.5/8 is still reported as private even though its /8 network, 172.0.0.0, is not.

Four more tools on the same page. Split divides a block into equal subnets of a size you choose, such as a /22 into four /24s, and lists them (the first 128 when there are more). Contains tells you whether an address falls inside the block. Merge takes a list of blocks and returns the fewest blocks that cover exactly the same addresses, dropping duplicates and anything already covered. Range turns a first and last address into the exact set of CIDR blocks between them, which is what a firewall rule needs when the range is not a neat power of two. Click any block in a result to open it in the Subnet view.

Strict about input. An octet with a leading zero, such as 192.168.01.1, is refused because some systems read it as octal. A dotted netmask must be a run of ones followed by zeros. Errors say what is wrong. Your settings go into the Share link, and everything is calculated in the browser.

Examples

  • A home network

    192.168.1.130/24 is a host in 192.168.1.0/24: 256 addresses, 254 usable hosts from .1 to .254, broadcast .255, netmask 255.255.255.0, private under RFC 1918.

  • Carving up a /22

    Split 10.20.0.0/22 into /24 and you get 10.20.0.0/24, 10.20.1.0/24, 10.20.2.0/24 and 10.20.3.0/24, 256 addresses each.

  • A firewall rule for an odd range

    Range turns 192.168.1.5 to 192.168.1.20 into five blocks: .5/32, .6/31, .8/29, .16/30 and .20/32. That is 16 addresses, covered exactly.

  • A point-to-point link

    198.51.100.0/31 shows two usable hosts, because RFC 3021 lets a /31 drop the network and broadcast addresses on a link between two routers.

Tips & best practices

  • Paste a dotted netmask if that is what you have: 10.0.0.0/255.0.0.0 is the same as 10.0.0.0/8.
  • Use Merge before adding a long list of routes or allow-list entries; overlapping blocks collapse into fewer lines.
  • For a firewall range that is not a power of two, Range gives the exact blocks instead of an over-wide one.
  • Open the binary view to see exactly where the network bits end and the host bits begin.

Frequently asked questions

Why does a /31 show two usable hosts?

RFC 3021 allows a /31 on a point-to-point link to use both of its addresses, because a link between two routers needs neither a network nor a broadcast address. A /30 in the same role has four addresses and only two hosts.

Why is there no broadcast address for IPv6?

IPv6 does not have broadcast; it uses multicast instead. The calculator shows the last address of the block in that row, and every address counts as usable. The all-zeros address of a subnet is the Subnet-Router anycast address, which is reachable but not assigned to one host.

Why is 172.16.5.5/8 still called private?

Because the address you typed is inside 172.16.0.0/12, the RFC 1918 private block, whatever prefix follows it. The /8 network it falls in, 172.0.0.0/8, is ordinary public space, which is why the check looks at your address rather than the masked network.

Why is 192.168.01.1 refused?

A leading zero is ambiguous. Some resolvers and older C functions read 010 as octal 8, so the same text can mean two different addresses. Remove the zero and it is accepted.

What prefix does a bare address get?

IPv4 addresses are shown inside their /24 and IPv6 addresses inside their /64, the usual subnet sizes. Add /32 or /128 to describe a single address.

What is 100.64.0.0/10?

Shared address space from RFC 6598, used between customers and a carrier-grade NAT. It is neither RFC 1918 private space nor public, which is why the calculator names it separately.

Is the class letter still meaningful?

No. Classful addressing was replaced by CIDR in 1993. The calculator shows the historical class because networking courses and exams still ask for it.

Related tools and how they differ

  • What's My IP: Shows the public address your connection uses; paste it here to see which block it belongs to.
  • URL Safety Analyzer: Checks a link rather than an address, including links that point at a raw IP.
  • Number Base Converter: Converts between binary, decimal and hex, the arithmetic behind a netmask.

Further reading

  • Subnetting Made Simple: Understanding IP Addresses and CIDR Notation12 min read

Private by design

This runs as client-side JavaScript. Keys, tokens, payloads, and other inputs never leave your device.