<Devsly/>
MCP https://devsly.io/mcp MCP Tools Webhooks

Keyboard Shortcuts

Navigation

Quick Search
⌘ / Ctrl + K
Toggle Dark Mode
⌘ / Ctrl + D
Close Dialogs
Esc

Tool Actions

Execute / Process
⌘ / Ctrl + Enter
Clear Input
⌘ / Ctrl + Shift + C
Copy Output
⌘ / Ctrl + Shift + X

Editor

Select All
⌘ / Ctrl + A
Undo
⌘ / Ctrl + Z
Redo
⌘ / Ctrl + Shift + Z
Questions or ideas? Reach us on LinkedIn, we reply. Connect

Subnet & IP Calculator Network Tools Local in browser

IPv4 and IPv6 subnet calculator in your browser: network, broadcast, usable hosts, masks, VLSM plans, range to CIDR, aggregation and IP conversion.

← → in the tab bar Copies a link to this page with what you typed added after the #.

Write 192.168.10.37/22, 192.168.10.37 255.255.252.0 or a wildcard mask 192.168.10.37/0.0.3.255. Results update as you type.

Drag or use the arrow keys. The address stays, the network around it changes.

Address in binary Network bits 22 Host bits 10
Try

Network and hosts

Network (CIDR)
Network address
Broadcast address
First usable host
Last usable host
Usable hosts
Total addresses

Masks, type and reverse DNS

Netmask
Wildcard mask
Address type
PTR name of the address
Reverse zone
Address range
Classful (historic)

What this calculator does

It answers the everyday questions about IP networks: which addresses belong to a subnet, how to divide an allocation between VLANs, which CIDR blocks cover a range, and what an address looks like in other notations. Every result is computed by this page's JavaScript in your browser. The calculator itself makes no network requests: what you type stays in this browser tab, and the page does not write it into the address bar. Copy link to this result builds a link that carries your input after the #, for you to share or bookmark.

  • IPv4 subnet: network and broadcast address, usable host range and count, netmask, wildcard mask, address type, reverse DNS names, and a bit-level view of where the prefix ends.
  • Split & VLSM: divide a network into equal subnets, into subnets of a given prefix, or into variable-length subnets sized for host counts, with the unused space listed as CIDR blocks.
  • Range & CIDR lists: turn a first-to-last range into CIDR blocks, merge a list of blocks into the shortest equivalent list, and test whether an address, or every address of a network, falls inside it.
  • IPv6: compressed and expanded forms, the prefix's first and last address, its size, type and ip6.arpa zone, and a list of subnets.
  • IP converter: one IPv4 address as dotted decimal, integer, hex, binary and IPv4-mapped IPv6.

How to read the results

Network, broadcast and usable hosts

A prefix length /p says that the first p bits name the network and the remaining 32 - p bits number the hosts. Clearing the host bits gives the network address; setting them all gives the broadcast address. A block holds 232 - p addresses and, because the first and last are reserved, 232 - p - 2 usable hosts. Two prefix lengths are exceptions: a /31 has no broadcast and both of its addresses are usable on a point-to-point link (RFC 3021), and a /32 is a single host route. In IPv6 the same role as the /31 is played by a /127 (RFC 6164).

Host counts describe unicast networks. For multicast (224.0.0.0/4), loopback (127.0.0.0/8) and 0.0.0.0/8 the calculator still shows the arithmetic, and says above the results that those values are not addresses you assign to interfaces.

If the address you type has host bits set (192.168.10.37/22), the calculator shows the subnet that contains it, 192.168.8.0/22, and says so above the results. Routers and firewalls usually expect the network address itself in a route or an access list.

Masks

The netmask is the prefix written as an address: ones for the network bits (/22 is 255.255.252.0). The wildcard mask is its inverse (0.0.3.255), the form Cisco IOS access lists and OSPF network statements use. The input accepts either after a slash or a space. A dotted mask is read as a netmask first and as a wildcard second, the same order as Python's ipaddress, so 0.0.0.0 means /0 and 255.255.255.255 means /32. A mask whose ones are not contiguous, such as 255.0.255.0, is refused: it is not a prefix.

Address type and reverse DNS

The type is the entry of the IANA IPv4 and IPv6 Special-Purpose Address Registries (RFC 6890), with the name the registry gives it and the RFC it cites. Both registries were last updated on 9 October 2025; the calculator was checked against every row of them on 3 December 2026. Examples: Private-Use (RFC 1918), Shared Address Space for carrier-grade NAT (100.64.0.0/10, RFC 6598), Loopback, Link Local, the documentation networks of RFC 5737 and RFC 3849, anycast services such as AS112 and AMT, and Segment Routing SIDs (5f00::/16, RFC 9602). Multicast blocks follow RFC 5771 and RFC 4291. An address with no special-purpose entry is shown as global unicast; an IPv6 address outside 2000::/3 shows its allocation in the IANA IPv6 Address Space registry (last updated 23 October 2025), usually "Reserved by IETF". The PTR name is where the address's reverse record lives (37.10.168.192.in-addr.arpa). The Reverse zone row names the zones that hold a network's PTR records: one zone when the prefix ends on an octet (IPv4) or hex digit (IPv6), several when it does not (a /22 spans four /24 zones), and for a block longer than /24 the enclosing /24 zone plus the RFC 2317 delegation name, such as 64/26.10.168.192.in-addr.arpa.

IPv6 forms

The compressed form follows RFC 5952 section 4: lower case, no leading zeros in a group, :: replaces the longest run of two or more zero groups (the first one when two runs are equally long), and a single zero group is written as 0. The expanded form writes all eight groups with four digits each, which is what you need for sorting or for building ip6.arpa names by hand. Address counts are exact integers, however large.

Worked examples

These are the tool's own results for the inputs shown.

IPv4 subnet, input 192.168.10.37/22

Network192.168.8.0/22
Broadcast192.168.11.255
Usable hosts192.168.8.1 to 192.168.11.254, 1,022 hosts
Netmask / wildcard255.255.252.0 / 0.0.3.255
Reverse zones8.168.192.in-addr.arpa to 11.168.192.in-addr.arpa (four zones)

VLSM, network 10.20.0.0/22, hosts Sales 500, Office 120, Lab 60, WAN link 2

SubnetNeedsBlockUsable rangeUsable
Sales50010.20.0.0/2310.20.0.1 to 10.20.1.254510
Office12010.20.2.0/2510.20.2.1 to 10.20.2.126126
Lab6010.20.2.128/2610.20.2.129 to 10.20.2.19062
WAN link210.20.2.192/3010.20.2.193 to 10.20.2.1942

708 of the 1,024 addresses are allocated. The free space is 10.20.2.196/30, 10.20.2.200/29, 10.20.2.208/28, 10.20.2.224/27 and 10.20.3.0/24, ready for the next subnets. With the /31 option the WAN link takes 10.20.2.192/31 instead.

Range to CIDR, 192.168.1.10 to 192.168.1.40

192.168.1.10/31
192.168.1.12/30
192.168.1.16/28
192.168.1.32/29
192.168.1.40/32

Five blocks cover the 31 addresses exactly. A range rarely matches one prefix, which is why firewall exports often need this conversion.

Aggregation, 10.0.0.0/24, 10.0.1.0/24, 10.0.2.0/23

10.0.0.0/22

The two /24s join into 10.0.0.0/23, which is adjacent to 10.0.2.0/23, and the pair forms one /22. Blocks that are already inside another one are dropped.

IPv6, input 2001:0DB8:0000:0000:0001:0000:0000:0001/64

Compressed2001:db8::1:0:0:1 (the first of the two equal zero runs is the one shortened)
Network2001:db8::/64
Last address2001:db8::ffff:ffff:ffff:ffff
Addresses18,446,744,073,709,551,616 (264)
TypeDocumentation, 2001:db8::/32 (RFC 3849)

Edge cases and pitfalls

  • Leading zeros are refused. Some software reads 010.1.1.1 as decimal (10.1.1.1); inet_aton(), the tools built on it and browsers' URL parsers read a leading zero as octal (8.1.1.1). The calculator refuses the input and tells you both readings instead of guessing. Python's ipaddress refuses it too. Shorthand forms such as 10.1 are refused for the same reason.
  • Usable hosts on /31 and /32. The formula 232 - p - 2 holds from /0 to /30. A /31 gives 2 (RFC 3021) and a /32 gives 1. For IPv6 router links, RFC 6164 recommends a /127.
  • VLSM sizes. A block must hold the hosts plus the network and broadcast addresses, so 60 hosts need a /26 (62 usable) and 63 hosts need a /25. Two hosts get a /30 unless you tick the /31 option. Placing the largest block first keeps every block on its natural boundary; placing a small block first can make a later large one impossible even when the total space would suffice.
  • Equal splits round up. Subnets come in powers of two, so asking for 5 gives 8 subnets of /27 from a /24, and the page says so.
  • One :: only, and never for a single group. 2001:db8:0:1:1:1:1:1 stays as it is; writing 2001:db8::1:1:1:1:1 is valid input but not the canonical form.
  • Zone indexes. fe80::1%eth0 names an interface, not an address. Remove the %eth0 part before calculating.
  • IPv4-mapped addresses. ::ffff:192.0.2.1 and ::ffff:c000:201 are the same address. The compressed form uses hex groups (RFC 5952 section 4); the mixed notation that section 5 recommends for mapped addresses is shown on its own line.

Standards used

  • RFC 4632CIDR notation and aggregation
  • RFC 950Subnetting, the all-zeros and all-ones host addresses
  • RFC 1519CIDR as first defined (1993), the end of classful addressing
  • RFC 302131-bit prefixes on point-to-point links
  • RFC 6164127-bit IPv6 prefixes on links between routers
  • RFC 5771IPv4 multicast address assignments
  • RFC 1918Private IPv4 address space
  • RFC 6598Shared address space, 100.64.0.0/10
  • RFC 5737IPv4 documentation networks
  • RFC 6890Special-purpose address registries
  • RFC 2317Classless in-addr.arpa delegation
  • RFC 4291IPv6 addressing architecture and text forms
  • RFC 5952Canonical text form of IPv6 addresses
  • RFC 4193Unique local IPv6 addresses, fc00::/7
  • RFC 3849IPv6 documentation prefix, 2001:db8::/32
  • RFC 3596The ip6.arpa reverse domain
  • RFC 6052NAT64 prefix 64:ff9b::/96
  • RFC 9602Segment Routing SIDs, 5f00::/16

The arithmetic is checked against Python's ipaddress module on more than 17,000 generated cases (networks, masks, ranges, aggregation, subnet lists and IPv6 text forms), and every case must match.

Frequently asked questions

How many usable hosts are in a /24?

254. A /24 has 256 addresses; the first (network) and the last (broadcast) are not assigned to hosts. A /23 has 510, a /25 has 126, a /30 has 2.

Why does a /31 have two usable addresses?

RFC 3021 lets a point-to-point link use a /31 with no network or broadcast address, because only two ends exist. It halves the address use of router links compared with a /30. Support depends on the router operating system, so check yours before you plan with it.

What is a wildcard mask?

The bitwise inverse of the netmask: zeros where the address must match, ones where any value is allowed. /22 is 0.0.3.255. Cisco access lists accept non-contiguous wildcards that match patterns rather than prefixes; this calculator only takes masks that describe a prefix.

Is 100.64.0.0/10 private address space?

Not in the RFC 1918 sense. It is shared address space for carrier-grade NAT (RFC 6598): a provider uses it between its NAT and its customers. Using it inside your own network can clash with the addresses your provider gives you.

What is the difference between 192.168.10.37/22 and 192.168.8.0/22?

The first is an interface address with its prefix: a host at .10.37 on that subnet. The second is the network itself. Both describe the same block of 1,024 addresses; route tables and access lists want the second form.

How many /64 subnets are in a /48 or a /56?

A /48 holds 216 = 65,536 subnets of /64, a /56 holds 256. The IPv6 tab shows the count for any prefix and lists the subnets of any size you choose.

Why is my IPv6 address shown differently from how I typed it?

Many strings describe the same IPv6 address. The compressed form is the canonical one from RFC 5952 that tools and logs should agree on, so that a text search finds every occurrence. The expanded form next to it shows every digit.

Does the shared link or anything I type reach your server?

The calculator itself makes no network requests: what you type stays in this browser tab. If you have allowed analytics cookies, Google Analytics sends its usual page-view and scroll events; they do not include what you type. Loading the page is counted in the site's usage statistics, as on every tool page, and what you type is not part of that record either. A copied link carries your input after the #; whoever opens it gets exactly that input restored in their own browser. A link holds at most 1,000,000 characters after the #, for example 20,000 IPv6 blocks written out in full, one per line. For a larger input, Copy link to this result is switched off and says why. Each copied link carries a check value, so a link that is longer than the limit, or that was changed or cut short on its way, is refused with a notice instead of being loaded in part.