100% offline
Developer
Free · no signup
Updated

Subnet Calculator

A Subnet Calculator works out the network address, broadcast address, usable host range, mask and address count for an IPv4 or IPv6 CIDR block, and divides or aggregates blocks — computed with exact bitwise arithmetic in your browser.

Try

Read as IPv4 with a /26 prefix — the address you typed is a host inside the block, so the network address is 192.168.1.128/26.

ScopePrivateclass C (historical)

Addresses

  • CIDR notation192.168.1.128/26
  • Network address192.168.1.128
  • Broadcast address192.168.1.191
  • First usable host192.168.1.129
  • Last usable host192.168.1.190
  • Usable hosts62
  • Total addresses64

Masks

  • Prefix length/26
  • Subnet mask255.255.255.192
  • Wildcard mask0.0.0.63Cisco ACLs
  • Network bits26
  • Host bits6

Representations

  • Binary11000000.10101000.00000001.10000000
  • Hexadecimal0xc0a80180
  • Integer3232235904
  • Reverse DNS zone1.168.192.in-addr.arpa (only /8, /16 and /24 boundaries delegate cleanly)

Registry ranges this block falls in

  • Private (RFC 1918, 192.168.0.0/16)

About Subnet Calculator

Type a block in whatever notation you have — 192.168.1.130/26, 10.0.0.0 255.0.0.0, a Cisco wildcard mask, a bare address, or any IPv6 form — and every derived value appears at once: network and broadcast address, first and last usable host, subnet and wildcard mask, the count in decimal and as a power of two, binary, hexadecimal, the reverse DNS zone, and which IANA special-purpose range the block sits in. Beyond the lookup there are three operations that turn a reference tool into a working one: split a prefix into equal subnets, plan a VLSM allocation from a list of host counts, and summarise a messy list of blocks and ranges into the fewest CIDRs that cover exactly the same addresses. All of it runs on BigInt, so an IPv6 /48 reports 2^80 addresses exactly rather than a rounded float, and the /31 and /32 cases are handled per RFC 3021 instead of being reported as having minus one usable host.

What Subnet Calculator does

  • IPv4 and IPv6 in one field, with the version detected from the input
  • Accepts prefix length, dotted netmask, Cisco wildcard mask or a bare address
  • Network, broadcast, first and last usable host, and exact address counts
  • /31 and /32 handled per RFC 3021 instead of reporting negative host counts
  • Split a block into equal subnets, listed with their ranges
  • VLSM planner: allocates largest-first from host counts and reports the waste
  • Summarise adjacent and overlapping blocks into the fewest CIDRs
  • Identifies private, CGNAT, link-local, documentation and multicast ranges with their RFCs
  • Binary, hexadecimal, integer, expanded IPv6 and the reverse DNS zone

When to reach for Subnet Calculator

  • Working out how many hosts a /26 actually gives you before assigning it
  • Carving a /16 into per-environment subnets that do not overlap
  • Planning a VLSM allocation for departments of different sizes
  • Collapsing a sprawling firewall or ACL list into a handful of aggregated routes
  • Converting an IP range from a log or abuse report into CIDR notation
  • Checking whether an address is private, CGNAT or genuinely public

How to use Subnet Calculator

  1. 01

    Enter the block

    Type an address with a prefix (192.168.1.130/26), a netmask (10.0.0.0 255.0.0.0), a wildcard mask, or a bare address. IPv6 works in the same field.

  2. 02

    Read the analysis

    Network, broadcast, usable range, masks, counts, scope and reverse DNS zone are listed together, each with a copy button.

  3. 03

    Split or plan

    Use 'Split evenly' to divide the block into equal subnets, or 'VLSM plan' to allocate from a list of host counts.

  4. 04

    Summarise a list

    Paste CIDRs, addresses or dashed ranges into 'Summarise' to collapse them into the fewest equivalent CIDR blocks.

When to use Subnet Calculator vs alternatives

AlternativeUse Subnet Calculator when…Use the alternative when…
`ipcalc` or `sipcalc` on the command lineyou want the split, VLSM and summarise operations in one place, and IPv6 handled as a first-class case rather than a flag.you are scripting and want the output piped somewhere.
Online subnet calculatorsyou are working with internal addressing you would rather not paste into an ad-funded page, or you need IPv6 counts that are exact rather than rounded to a float.you only need a single IPv4 lookup and already have one bookmarked.
Asking an AI chatbotthe answer has to be right — subnet boundaries are pure bit arithmetic, and a language model producing a confident off-by-one broadcast address is a live outage.you want the concept of subnetting explained rather than a block calculated.

Frequently asked questions

Why does a /24 have 254 usable hosts instead of 256?
Two addresses in every ordinary IPv4 subnet are not assignable: the first is the network address that identifies the subnet itself, and the last is the broadcast address. A /24 spans 256 addresses, so 254 are left for hosts. The same subtraction applies at every size, which is why a /30 — four addresses — yields only two usable hosts and is the classic point-to-point allocation.
Can I use a /31 or a /32?
Yes, and they are the two cases where the minus-two rule stops applying. RFC 3021 allows a /31 on a point-to-point link, where there is no broadcast address and both addresses are usable — which is why this tool reports 2 rather than 0. A /32 is a single host route, common for loopback interfaces and firewall rules. Calculators that apply the subtraction blindly report 0 or -1 usable hosts for these, which is simply wrong.
What is the difference between /24 and 255.255.255.0?
Nothing — they are two notations for the same mask. The prefix length counts the leading one-bits; the dotted form spells those bits out as four octets. 255.255.255.0 is twenty-four one-bits followed by eight zeros, so it is a /24. A netmask's one-bits must be contiguous from the left, which is why 255.255.0.255 cannot exist and is rejected here.
Why does the VLSM planner allocate the largest subnet first?
Because every subnet has to start on a boundary that is a multiple of its own size, so placing a small subnet first can strand the aligned boundaries a larger one needs. Descending order packs the block with no gaps and no wasted alignment — a naive in-order pass can report 'does not fit' on a block that comfortably does.
Why is 0177.0.0.1 rejected as invalid?
Because it is ambiguous, and the ambiguity is a security problem rather than a formatting quibble. C's inet_aton reads a leading zero as octal, making 0177.0.0.1 equal to 127.0.0.1, while Go and modern browsers reject the notation outright. Code that validates an address with one parser and connects with another is the mechanism behind a family of SSRF filter bypasses, so this tool refuses the input and says why instead of picking an interpretation.
How many hosts are in an IPv6 /64, and is there a broadcast address?
A /64 holds 2^64 addresses — about 18.4 quintillion — and IPv6 has no broadcast address, so nothing is subtracted for one. The all-zeros interface identifier is reserved as the subnet-router anycast address. A /64 is the standard size for a single link because SLAAC address autoconfiguration assumes 64 host bits.
Is anything uploaded?
No. Every value is bitwise arithmetic on BigInts in your browser, with no request made. Internal addressing plans are exactly the kind of thing worth not pasting into someone else's server.

Related concepts