Free tool

Subnet Calculator (IPv4 and IPv6)

Enter an IPv4 or IPv6 address with a prefix length or mask to get the network and broadcast addresses, usable host range, subnet mask, wildcard mask and binary form. A /24 holds 254 usable hosts, a /31 point-to-point link holds 2 and an IPv6 /48 holds 65,536 /64 networks.

Last updated How it works Subnet mask table Sources

Accepts 192.168.1.0/24, 10.0.0.5 255.255.252.0, a wildcard mask, 2001:db8::/48, a range such as 10.0.0.0 - 10.0.3.255, or prefixes separated by commas to summarise.

Plan subnets by host count (VLSM)

Allocated largest first from the network above. Each subnet gets the smallest block that holds its hosts plus the network and broadcast addresses.

IPv4 192.168.10.0/26

Network192.168.10.0
Broadcast192.168.10.63
Usable hosts62
Subnet mask255.255.255.192
CIDR notation192.168.10.0/26
Usable host range192.168.10.1 to 192.168.10.62
Network address192.168.10.0
Broadcast address192.168.10.63
First usable host192.168.10.1
Last usable host192.168.10.62
Usable hosts62Total addresses minus the network and broadcast addresses.
Total addresses64 (2^6)
Subnet mask255.255.255.192
Wildcard mask0.0.0.63The subnet mask with every bit inverted.
Prefix length/2626 bits network, 6 bits host.
Address typePrivate-Use (RFC 1918)Not globally reachable.
Historical classCClasses no longer set the mask: CIDR replaced them (RFC 4632).
PositionBlock 1 of 4 /26 blocks in 192.168.10.0/24
Reverse DNS zone10.168.192.in-addr.arpaThe /24 zone that holds the PTR records for this subnet.
Network as integer3232238080 (hex 0xC0A80A00)

Block 1 of 4 in 192.168.10.0/24

Binary view

Network bits Host bits

Address11000000.10101000.00001010.00000000
Subnet mask11111111.11111111.11111111.11000000
Network11000000.10101000.00001010.00000000
Broadcast11000000.10101000.00001010.00111111

Worked examples

Split 192.168.10.0/24 into four /26 subnets

Each /26 has 64 addresses: 62 hosts, a network address and a broadcast address S06 derived. The first one is the example in the calculator above.

192.168.10.0/24 split into 4 /26 subnets, 62 usable hosts each
#SubnetUsable hosts rangeBroadcastUsable
1192.168.10.0/26192.168.10.1 to 192.168.10.62192.168.10.6362
2192.168.10.64/26192.168.10.65 to 192.168.10.126192.168.10.12762
3192.168.10.128/26192.168.10.129 to 192.168.10.190192.168.10.19162
4192.168.10.192/26192.168.10.193 to 192.168.10.254192.168.10.25562

Showing 4 of 4 subnets.

IPv6: 2001:db8:abcd::/48

A /48 leaves 16 bits for subnets before the /64 boundary, so it holds 2^16 = 65,536 /64 networks derived. IPv6 has no broadcast address S08. 2001:db8::/32 is the block reserved for documentation S02.

IPv6 2001:db8:abcd::/48

Prefix2001:db8:abcd::/48
Prefix length/48
Addresses2^80
/64 networks65,536
Network prefix2001:db8:abcd::/48
First address2001:db8:abcd::
Last address2001:db8:abcd:ffff:ffff:ffff:ffff:ffff
Total addresses1,208,925,819,614,629,174,706,176 (2^80)
/64 networks65,536A /64 is the standard size for one LAN.
Broadcast addressNoneIPv6 has no broadcast addresses; multicast does that job (RFC 4291).
Expanded form2001:0db8:abcd:0000:0000:0000:0000:0000/48
Prefix maskffff:ffff:ffff::
Prefix length/4848 bits network, 80 bits interface.
Address typeDocumentation (RFC 3849)Not globally reachable.
PositionBlock 43,982 of 65,536 /48 blocks in 2001:db8::/32
Reverse DNS zoned.c.b.a.8.b.d.0.1.0.0.2.ip6.arpa

Block 43982 of 65536 in 2001:db8::/32

Hex view

Network bits Interface bits

Address2001:0db8:abcd:0000:0000:0000:0000:0000
Network2001:0db8:abcd:0000:0000:0000:0000:0000
Last address2001:0db8:abcd:ffff:ffff:ffff:ffff:ffff
2001:db8:abcd::/48 split into 65,536 /64 subnets, 18,446,744,073,709,551,616 addresses each
#PrefixFirst addressLast address
12001:db8:abcd::/642001:db8:abcd::2001:db8:abcd:0:ffff:ffff:ffff:ffff
22001:db8:abcd:1::/642001:db8:abcd:1::2001:db8:abcd:1:ffff:ffff:ffff:ffff
32001:db8:abcd:2::/642001:db8:abcd:2::2001:db8:abcd:2:ffff:ffff:ffff:ffff
42001:db8:abcd:3::/642001:db8:abcd:3::2001:db8:abcd:3:ffff:ffff:ffff:ffff
52001:db8:abcd:4::/642001:db8:abcd:4::2001:db8:abcd:4:ffff:ffff:ffff:ffff
62001:db8:abcd:5::/642001:db8:abcd:5::2001:db8:abcd:5:ffff:ffff:ffff:ffff
72001:db8:abcd:6::/642001:db8:abcd:6::2001:db8:abcd:6:ffff:ffff:ffff:ffff
82001:db8:abcd:7::/642001:db8:abcd:7::2001:db8:abcd:7:ffff:ffff:ffff:ffff
92001:db8:abcd:8::/642001:db8:abcd:8::2001:db8:abcd:8:ffff:ffff:ffff:ffff
102001:db8:abcd:9::/642001:db8:abcd:9::2001:db8:abcd:9:ffff:ffff:ffff:ffff
112001:db8:abcd:a::/642001:db8:abcd:a::2001:db8:abcd:a:ffff:ffff:ffff:ffff
122001:db8:abcd:b::/642001:db8:abcd:b::2001:db8:abcd:b:ffff:ffff:ffff:ffff
132001:db8:abcd:c::/642001:db8:abcd:c::2001:db8:abcd:c:ffff:ffff:ffff:ffff
142001:db8:abcd:d::/642001:db8:abcd:d::2001:db8:abcd:d:ffff:ffff:ffff:ffff
152001:db8:abcd:e::/642001:db8:abcd:e::2001:db8:abcd:e:ffff:ffff:ffff:ffff
162001:db8:abcd:f::/642001:db8:abcd:f::2001:db8:abcd:f:ffff:ffff:ffff:ffff

Showing 16 of 65,536 subnets.

How it works

Prefix length. A CIDR prefix such as /26 states how many leading bits of the address are the network part. The prefix length is a number from 0 to 32 for an IPv4 address S05. The remaining bits number the hosts. A /26 has 26 network bits and 6 host bits, so it holds 2^6 = 64 addresses derived.

Network and broadcast addresses. The subnet mask has a 1 for every network bit. The network address is the address AND the mask, which sets every host bit to 0. The broadcast address is the network address OR the wildcard mask, which sets every host bit to 1 derived. A host number of all zeros or all ones is not a host address S06. For 192.168.10.0/26: 192.168.10.0 AND 255.255.255.192 = 192.168.10.0, and 192.168.10.0 OR 0.0.0.63 = 192.168.10.63. The hosts are 192.168.10.1 to 192.168.10.62: 64 minus 2 = 62 usable derived.

Why /31 and /32 differ. A /31 has two addresses. RFC 3021 lets a point-to-point link use both as host addresses, with no network or broadcast address S07, so the calculator shows 2 usable. A /32 is one address, used for a host route or a loopback, so it shows 1.

Why IPv6 has no broadcast. Multicast addresses replace broadcast addresses entirely S08. So the calculator lists every address in an IPv6 prefix, from the first to the last. Interface IDs for global unicast addresses are 64 bits long, so one LAN is a /64 S08 S12. A /127 is for links between routers S10. Each address is shown in the standard short form, in lower case with the longest run of zero groups written as “::” S09, and in full.

Address types. The type of each block comes from the two IANA special-purpose address registries S01 S02. Multicast and the global unicast range come from the IANA address space registries S03 S04. The registries were read on 2026-11-06 and are built into the page, so the calculator needs no network. The old class letter (A to E) is shown for reference only; classless prefixes replaced the classes S05 S06.

Source dates. The RFCs behind these rules date from 1989 to 2015. They are standards that set rules, not measurements, so their age does not make them dated. A newer RFC that replaces one of them would trigger a refresh, and the IANA registries are checked yearly.

Splitting, VLSM and ranges. Splitting a /p into /q gives 2^(q - p) subnets of equal size derived. The VLSM planner sorts the subnets you need from largest to smallest. Each gets the smallest power-of-two block that holds its hosts plus the network and broadcast addresses, so every block stays aligned derived. A range such as 10.0.0.1 - 10.0.0.6 becomes the fewest CIDR blocks that cover it exactly, and a list of prefixes is merged into the shortest summary.

Checks. The arithmetic uses whole-number BigInt maths for both IPv4 and IPv6, so the 2^128 IPv6 space is exact. Automated tests check every prefix length in the reference table below against independent arithmetic. They also cover /0, /31, /32, /127 and /128, and invalid input such as 300.1.1.1, 10.0.0.0/33 and ::g.

Subnet mask cheat sheet: /8 to /32

Every row is computed by the same engine as the calculator. Usable hosts are total addresses minus 2, except /31 (2, RFC 3021) and /32 (1) S06 S07 derived. Download as CSV.

IPv4 prefix lengths with their masks and sizes
PrefixSubnet maskWildcard maskTotal addressesUsable 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

IPv6 prefix sizes

Counts are powers of two derived; the notes cite the RFCs in the source panel S08 S10 S11. Download as CSV.

Common IPv6 prefix lengths
PrefixAddresses/64 networksNote
/322^964,294,967,296
/402^8816,777,216
/442^841,048,576
/482^8065,536End site assignment (RFC 6177 discusses /48 and /56)
/522^764,096
/562^72256Smaller end site assignment (RFC 6177)
/602^6816
/642^641One LAN: 64-bit interface IDs (RFC 4291)
/962^32 (4,294,967,296)part of one
/1122^16 (65,536)part of one
/1202^8 (256)part of one
/1242^4 (16)part of one
/1262^2 (4)part of one
/1272^1 (2)part of onePoint-to-point link between routers (RFC 6164)
/1282^0 (1)part of oneOne address

Frequently asked questions

How many usable hosts are in a /24?

254. A /24 has 2^8 = 256 addresses, and the first (network) and last (broadcast) are not host addresses S06 derived. In 192.168.1.0/24 the hosts run from 192.168.1.1 to 192.168.1.254. A /31 is the exception, with both of its addresses usable on point-to-point links S07.

What is a wildcard mask?

A wildcard mask is the subnet mask with every bit inverted, so each octet is 255 minus the mask octet derived. 255.255.252.0 becomes 0.0.3.255. The calculator shows it for every IPv4 prefix and also accepts one as input, so 172.16.0.0 0.0.15.255 reads as 172.16.0.0/20.

Why does a /31 have two usable addresses?

RFC 3021 lets a point-to-point link use a /31, and on such a link both addresses MUST be treated as host addresses S07. A link has only two ends, so it needs no broadcast address. Where a device does not support /31 links, a /30 gives 2 usable addresses out of 4 S06 derived.

What prefix should I use for an IPv6 LAN?

A /64. Interface IDs for global unicast addresses are 64 bits long, which leaves 64 bits for the subnet prefix S08 S12. A /48 holds 65,536 /64 networks and a /56 holds 256 derived; RFC 6177 notes that three regional registries, APNIC, ARIN and RIPE, encourage /56 assignments to end sites S11. A /127 is for links between routers S10.

Is my input sent anywhere?

No. The calculation runs in your browser in one script served from sysprobs.com; it makes no network requests, sets no cookies and saves none of your input. The only thing the site keeps in your browser is your light or dark theme choice. The address bar keeps your input so you can share the result, so a link you open or share carries those values like any other web address.

Sources

Every figure on this page carries a key that links to an entry below. Retrieved is the date the figure was read from the source for this dataset; the changelog gives the date of the last full check. Sponsor names who paid for the research; a figure with a sponsor is read with that interest in mind. Keys follow the source ledger, so a missing number is a source that was reviewed and not used on this page. Hub-wide rules are on the methodology page.

  1. S01 Internet Assigned Numbers Authority (IANA), IANA IPv4 Special-Purpose Address Space registry (iana.org)

    Note
    Every IPv4 address type the calculator names, except multicast, comes from this registry: 26 blocks with name, RFC and the Globally Reachable column.
    Sponsor
    none stated
    Published
    registry last updated 2025-10-09
    Retrieved
    2026-11-06
    • 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are Private-Use (RFC 1918), not globally reachable

      Verbatim
      10.0.0.0/8,Private-Use,[RFC 1918],1996-02,N/A,True,True,True,False,False
    • 100.64.0.0/10 is Shared Address Space (RFC 6598)

      Verbatim
      100.64.0.0/10,Shared Address Space,[RFC 6598],2012-04,N/A,True,True,True,False,False
  2. S02 Internet Assigned Numbers Authority (IANA), IANA IPv6 Special-Purpose Address Space registry (iana.org)

    Note
    IPv6 address types for the special-purpose blocks, such as documentation, unique-local and link-local.
    Sponsor
    none stated
    Published
    registry last updated 2025-10-09
    Retrieved
    2026-11-06
    • 2001:db8::/32 is reserved for documentation (RFC 3849), the block used in this page's IPv6 example

      Verbatim
      2001:db8::/32,Documentation,[RFC 3849],2004-07,N/A,False,False,False,False,False
    • fe80::/10 is Link-Local Unicast (RFC 4291)

      Verbatim
      fe80::/10,Link-Local Unicast,[RFC 4291],2006-02,N/A,True,True,False,False,True
  3. S03 Internet Assigned Numbers Authority (IANA), IANA IPv4 Address Space Registry (iana.org)

    Note
    Lists 224/8 to 239/8 as Multicast. The calculator shows the 16 rows as one block, 224.0.0.0/4, with the reference the registry gives in its footnote 14, RFC 5771.
    Sponsor
    none stated
    Published
    registry last updated 2025-10-10
    Retrieved
    2026-11-06
    Verbatim
    224/8,Multicast,1981-09,,,RESERVED,[14]
  4. S04 Internet Assigned Numbers Authority (IANA), Internet Protocol Version 6 Address Space (iana.org)

    Note
    IPv6 address types outside the special-purpose registry, such as Global Unicast (2000::/3) and Multicast (ff00::/8).
    Sponsor
    none stated
    Published
    registry last updated 2025-10-23
    Retrieved
    2026-11-06
    Verbatim
    2000::/3,Global Unicast,[RFC 3513]; [RFC 4291]
  5. S05 IETF (RFC 4632, Best Current Practice), Classless Inter-domain Routing (CIDR): The Internet Address Assignment and Aggregation Plan (rfc-editor.org)

    Sponsor
    none stated
    Published
    2006-08
    Retrieved
    2026-11-06
    • A prefix length is a number from 0 to 32 that gives the number of significant (network) bits of an IPv4 address

      Verbatim
      followed by the "/" (slash) character, followed by a decimal value between 0 and 32 that describes the number of significant bits.
    • Classless prefixes replaced the Class A, B and C network numbers

      Verbatim
      In the simplest sense, the change from Class A/B/C network numbers to classless prefixes is to make explicit which bits in a 32-bit IPv4 address are interpreted as the network number
  6. S06 IETF (RFC 1122, Internet Standard), Requirements for Internet Hosts: Communication Layers (rfc-editor.org)

    Sponsor
    none stated
    Published
    1989-10
    Retrieved
    2026-11-06
    • A host number of all zeros or all ones (0 or -1) is not a host address, so a subnet loses two addresses to the network and broadcast addresses

      Verbatim
      IP addresses are not permitted to have the value 0 or -1 for any of the <Host-number>, <Network-number>, or <Subnet- number> fields (except in the special cases listed above).
    • Historical classes: Class D is multicast and Class E is reserved

      Verbatim
      There are now five classes of IP addresses: Class A through Class E. Class D addresses are used for IP multicasting [IP:4], while Class E addresses are reserved for experimental use.
  7. S07 IETF (RFC 3021, Proposed Standard), Using 31-Bit Prefixes on IPv4 Point-to-Point Links (rfc-editor.org)

    Sponsor
    none stated
    Published
    2000-12
    Retrieved
    2026-11-06
    Verbatim
    In a point-to-point link with a 31-bit subnet mask, the two addresses above MUST be interpreted as host addresses.
  8. S08 IETF (RFC 4291, Draft Standard), IP Version 6 Addressing Architecture (rfc-editor.org)

    Sponsor
    none stated
    Published
    2006-02
    Retrieved
    2026-11-06
    • IPv6 has no broadcast addresses; multicast does that job

      Verbatim
      There are no broadcast addresses in IPv6, their function being superseded by multicast addresses.
    • Interface IDs for global unicast addresses are 64 bits long, which leaves 64 bits for the subnet prefix (the RFC exempts only addresses that start with binary 000)

      Verbatim
      For all unicast addresses, except those that start with the binary value 000, Interface IDs are required to be 64 bits long and to be constructed in Modified EUI-64 format.
  9. S09 IETF (RFC 5952, Proposed Standard), A Recommendation for IPv6 Address Text Representation (rfc-editor.org)

    Sponsor
    none stated
    Published
    2010-08
    Retrieved
    2026-11-06
    Verbatim
    The use of the symbol "::" MUST be used to its maximum capability. For example, 2001:db8:0:0:0:0:2:1 must be shortened to 2001:db8::2:1.
  10. S10 IETF (RFC 6164, Proposed Standard), Using 127-Bit IPv6 Prefixes on Inter-Router Links (rfc-editor.org)

    Sponsor
    none stated
    Published
    2011-04
    Retrieved
    2026-11-06
    Verbatim
    Routers MUST support the assignment of /127 prefixes on point-to-point inter-router links.
  11. S11 IETF (RFC 6177, Best Current Practice), IPv6 Address Assignment to End Sites (rfc-editor.org)

    Sponsor
    none stated
    Published
    2011-03
    Retrieved
    2026-11-06
    Verbatim
    APNIC [APNIC-ENDSITE], ARIN [ARIN-ENDSITE], and RIPE [RIPE-ENDSITE] have revised the end site assignment policy to encourage the assignment of smaller (i.e., /56) blocks to end sites.
  12. S12 IETF (RFC 7421, Informational), Analysis of the 64-bit Boundary in IPv6 Addressing (rfc-editor.org)

    Sponsor
    none stated
    Published
    2015-01
    Retrieved
    2026-11-06
    Verbatim
    Currently, the interface identifier is defined as 64 bits long for almost every case, leaving 64 bits for the subnet prefix.

Figures marked derived are computed from the sourced figures beside them; the formula is stated in the text.

Cite this page

Data on this page is published under CC BY 4.0. Use any figure, chart or table with a link back to this page.

Plain text
Sysprobs Data (2026). Subnet Calculator (IPv4 and IPv6). Edited by Dinesh Kumar. https://sysprobs.com/data/tools/subnet-calculator/ (updated 6 November 2026, accessed [date accessed]).
HTML
APA
Sysprobs Data. (2026, November 6). Subnet Calculator (IPv4 and IPv6). Retrieved [date accessed], from https://sysprobs.com/data/tools/subnet-calculator/

Cite the calculator by name with a link to this page. Address types come from the IANA registries listed in the source panel, retrieved on the date shown there.

Embed this calculator

Paste the snippet into your page. Keep the attribution line under the iframe; it is the only condition of use.

The last line fits the frame to the calculator; if your site strips scripts, leave it out and the frame scrolls inside.

Changelog

  • : First version: IPv4 and IPv6 calculator with split tables, VLSM planning, range to CIDR and summarising; address types from the IANA registries retrieved 2026-11-06.