Subnet Calculator

An IPv4 or IPv6 subnet worked out in the browser: its network and host range, broadcast address, masks and reverse DNS zones, the kind of address block IANA says it is, and whether another address is inside it.

Overview

A prefix length splits an address into a network part and a host part. In 192.168.1.10/24 the first 24 bits name the network and the last 8 the host, so every address from 192.168.1.0 to 192.168.1.255 is on the same network and reaches the others directly. The calculator does that split for any address and prefix, IPv4 or IPv6, and names everything that follows from it.

Web interface

Type an address with its prefix or its netmask. The result appears as you type; a complaint about the input waits until you stop typing, because 192.168.1. is not wrong yet. The buttons under the field fill in an example.

  • The subnet in CIDR notation stands at the top, with Copy beside it, followed by a sentence placing the address you typed within it.
  • A click on any value selects all of it, ready to copy.
  • Address type names the IANA block the subnet lies in and links to the IP Address Lookup for the address.
  • Is an address in this subnet? takes a second address and says whether it is inside, and if not, which network it belongs to at the same prefix. It also warns when the address is the network or broadcast address, which no host can use.
  • In binary, for IPv4, shows the address, netmask and network bit by bit, the network bits in colour.

The address bar follows the input, so a result can be bookmarked or shared as a link.

PatternExample
/calculate/subnet/{address}/{prefix}/calculate/subnet/192.168.1.10/24
/calculate/subnet/{address}/{netmask}/calculate/subnet/10.20.30.40/255.255.240.0
/calculate/subnet/{ipv6}/{prefix}/calculate/subnet/2001:db8::1/64
/calculate/subnet/{address}/calculate/subnet/192.168.1.10, a single address

A netmask in the link is turned into its prefix once the page has read it, so the address bar then shows /calculate/subnet/10.20.30.40/20. An IPv6 address goes into the path as it is, without brackets.

Reading the result

RowWhat it is
Netmaskthe prefix written as an address: /24 is 255.255.255.0
Wildcard maskthe netmask inverted, 0.0.0.255 for a /24, the form Cisco access lists and OSPF take
Network addressthe first address, with every host bit zero; it names the subnet
Broadcast addressthe last address, with every host bit one; a packet to it reaches every host on the subnet
Usable range, Usable hoststhe addresses between those two, the ones a host can be given
Total addressesevery address in the subnet, 2 to the power of the host bits
Reverse DNS zonewhere the PTR records for the subnet live, under in-addr.arpa or ip6.arpa
Prefix length, First address, Last addressIPv6: the bounds of the subnet; IPv6 has no broadcast address
AddressesIPv6: counted exactly, all 39 digits of a /0 included, with the power of two beside it
/64 networksIPv6: how many standard-sized networks the prefix holds
ExpandedIPv6: the address with every group written out to four digits

Two IPv4 prefixes have no network or broadcast address to give up. A /31 is a point-to-point link, and RFC 3021 lets both of its addresses be used; a /32 is a single address. IPv6 addresses are shown as RFC 5952 writes them: lower case, no leading zeros, and the longest run of zero groups shortened to ::. The first address of an IPv6 subnet is its Subnet-Router anycast address (RFC 4291).

A reverse zone ends on a whole octet for IPv4 and on a whole hex digit for IPv6, so a prefix in between covers several zones: 172.16.0.0/12 spans the 16 zones from 16.172.in-addr.arpa to 31.172.in-addr.arpa. An IPv4 subnet smaller than a /24 lies inside one /24 zone, and is delegated below it as RFC 2317 describes.

Address types

The address type is the most specific block in the IANA special-purpose address registries that contains the whole subnet, with the first RFC IANA cites for it and two of the registry's columns: Globally reachable, whether packets to the block may travel beyond the network that uses it, and Forwardable, whether a router may forward them at all. A subnet that takes in several blocks, such as 192.0.0.0/16, lists the first four.

Outside every block, an IPv4 subnet is public address space, or multicast within 224.0.0.0/4 (RFC 5771). An IPv6 subnet is global unicast within 2000::/3, multicast within ff00::/8, and otherwise reserved by the IETF (RFC 4291). The tables are the registries as published on 13 September 2026.

IPv4

BlockNameRFCGlobally reachableForwardable
0.0.0.0/8This networkRFC 791nono
0.0.0.0/32This host on this networkRFC 1122nono
10.0.0.0/8Private-UseRFC 1918noyes
100.64.0.0/10Shared Address SpaceRFC 6598noyes
127.0.0.0/8LoopbackRFC 1122nono
169.254.0.0/16Link LocalRFC 3927nono
172.16.0.0/12Private-UseRFC 1918noyes
192.0.0.0/24IETF Protocol AssignmentsRFC 6890nono
192.0.0.0/29IPv4 Service Continuity PrefixRFC 7335noyes
192.0.0.8/32IPv4 dummy addressRFC 7600nono
192.0.0.9/32Port Control Protocol AnycastRFC 7723yesyes
192.0.0.10/32Traversal Using Relays around NAT AnycastRFC 8155yesyes
192.0.0.170/32NAT64/DNS64 DiscoveryRFC 8880nono
192.0.0.171/32NAT64/DNS64 DiscoveryRFC 8880nono
192.0.2.0/24Documentation (TEST-NET-1)RFC 5737nono
192.31.196.0/24AS112-v4RFC 7535yesyes
192.52.193.0/24AMTRFC 7450yesyes
192.88.99.0/24Deprecated (6to4 Relay Anycast)RFC 7526not statednot stated
192.88.99.2/326a44-relay anycast addressRFC 6751noyes
192.168.0.0/16Private-UseRFC 1918noyes
192.175.48.0/24Direct Delegation AS112 ServiceRFC 7534yesyes
198.18.0.0/15BenchmarkingRFC 2544noyes
198.51.100.0/24Documentation (TEST-NET-2)RFC 5737nono
203.0.113.0/24Documentation (TEST-NET-3)RFC 5737nono
240.0.0.0/4ReservedRFC 1112nono
255.255.255.255/32Limited BroadcastRFC 8190nono

IPv6

BlockNameRFCGlobally reachableForwardable
::1/128Loopback AddressRFC 4291nono
::/128Unspecified AddressRFC 4291nono
::ffff:0:0/96IPv4-mapped AddressRFC 4291nono
64:ff9b::/96IPv4-IPv6 TranslationRFC 6052yesyes
64:ff9b:1::/48IPv4-IPv6 TranslationRFC 8215noyes
100::/64Discard-Only Address BlockRFC 6666noyes
100:0:0:1::/64Dummy IPv6 PrefixRFC 9780nono
2001::/23IETF Protocol AssignmentsRFC 2928nono
2001::/32TEREDORFC 4380not statedyes
2001:1::1/128Port Control Protocol AnycastRFC 7723yesyes
2001:1::2/128Traversal Using Relays around NAT AnycastRFC 8155yesyes
2001:1::3/128DNS-SD Service Registration Protocol AnycastRFC 9665yesyes
2001:2::/48BenchmarkingRFC 5180noyes
2001:3::/32AMTRFC 7450yesyes
2001:4:112::/48AS112-v6RFC 7535yesyes
2001:10::/28Deprecated (previously ORCHID)RFC 4843not statednot stated
2001:20::/28ORCHIDv2RFC 7343yesyes
2001:30::/28Drone Remote ID Protocol Entity Tags (DETs) PrefixRFC 9374yesyes
2001:db8::/32DocumentationRFC 3849nono
2002::/166to4RFC 3056not statedyes
2620:4f:8000::/48Direct Delegation AS112 ServiceRFC 7534yesyes
3fff::/20DocumentationRFC 9637nono
5f00::/16Segment Routing (SRv6) SIDsRFC 9602noyes
fc00::/7Unique-LocalRFC 4193noyes
fe80::/10Link-Local UnicastRFC 4291nono

IPv4 prefixes

PrefixNetmaskWildcardAddressesUsable hosts
/8255.0.0.00.255.255.25516,777,21616,777,214
/9255.128.0.00.127.255.2558,388,6088,388,606
/10255.192.0.00.63.255.2554,194,3044,194,302
/11255.224.0.00.31.255.2552,097,1522,097,150
/12255.240.0.00.15.255.2551,048,5761,048,574
/13255.248.0.00.7.255.255524,288524,286
/14255.252.0.00.3.255.255262,144262,142
/15255.254.0.00.1.255.255131,072131,070
/16255.255.0.00.0.255.25565,53665,534
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/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

Input rules

  • A prefix follows a slash, 192.168.1.10/24. A netmask follows a slash or a space, 192.168.1.10 255.255.255.0.
  • An address on its own is a single host, a /32 or a /128.
  • IPv6 may carry an IPv4 address in its last 32 bits, ::ffff:192.0.2.1, and may be written in brackets, [2001:db8::1]/64, the way a URL writes it.
  • Upper and lower case are the same.

Some input is refused, each time with the reason:

MessageWhen
"010" has a leading zero, which some systems read as an octal number. Leave the zero out.a number with a leading zero; inet_aton reads 010 as 8, so the text would name two addresses
0.0.0.255 is a wildcard mask, a netmask turned inside out. The netmask is 255.255.255.0, which is /24.a wildcard mask where a netmask belongs
255.0.255.0 is not a netmask. Its ones have to come first, in one unbroken run.a mask that is neither
Each number in an IPv4 address runs from 0 to 255, and 300 is past that.a number above 255
An IPv4 prefix runs from /0 to /32.a longer prefix; for IPv6 the limit is /128
The zone after the % sign, such as %eth0, is not part of the address. Leave it out.an IPv6 zone index, fe80::1%eth0
"::" may appear only once in an IPv6 address.two shortened runs, which would make the address ambiguous

No API

There is no API for this tool. A subnet is a handful of bit operations, run in the browser, and the table under Reading the result describes each of them well enough to redo anywhere else.

Privacy

Nothing leaves the browser. The addresses are worked out on the page and are not stored or sent. The address bar changes as you type, which puts the subnet into the browser's history like any other page. The link to the IP Address Lookup opens that tool, which does send the address to the server, and only once you follow it.