Skip to content

Runs entirely in your browser. Nothing you paste leaves this page.

Free / No sign-up

Subnet calculator for IPv4 and IPv6.

Enter an address in CIDR notation or with a subnet mask to get the network, broadcast, usable host range, masks and a bit-by-bit binary view. Split it into smaller subnets, or work out IPv6 prefixes.

Address family

Result

Network
192.168.10.64/26
Usable host range
192.168.10.65 - 192.168.10.126
Broadcast
192.168.10.127
Usable hosts
62 of 64 addresses
Subnet mask
255.255.255.192
Wildcard mask
0.0.0.63
Address type
Private (RFC 1918)
Legacy class
C
Integer / hex
3232238157 / 0xC0A80A4D
Reverse DNS
77.10.168.192.in-addr.arpa

Binary view■ network bits (26)■ host bits (6)

Address11000000.10101000.00001010.01001101
Mask11111111.11111111.11111111.11000000
Network11000000.10101000.00001010.01000000
Wildcard00000000.00000000.00000000.00111111
SubnetUsable rangeBroadcast
192.168.10.64/29192.168.10.65 - 192.168.10.70192.168.10.71
192.168.10.72/29192.168.10.73 - 192.168.10.78192.168.10.79
192.168.10.80/29192.168.10.81 - 192.168.10.86192.168.10.87
192.168.10.88/29192.168.10.89 - 192.168.10.94192.168.10.95
192.168.10.96/29192.168.10.97 - 192.168.10.102192.168.10.103
192.168.10.104/29192.168.10.105 - 192.168.10.110192.168.10.111
192.168.10.112/29192.168.10.113 - 192.168.10.118192.168.10.119
192.168.10.120/29192.168.10.121 - 192.168.10.126192.168.10.127

Accepts CIDR (10.0.0.7/22) or an address and mask (10.0.0.7 255.255.252.0). /31 and /32 follow RFC 3021: no network or broadcast address is reserved.

How to use it.

  1. 01

    Type an address with a prefix (10.0.0.7/22) or a mask (10.0.0.7 255.255.252.0), or pick an example.

  2. 02

    Read the network, host range, broadcast and masks, and the binary view of network and host bits.

  3. 03

    Drag the split slider to divide the block into smaller subnets, or switch to IPv6.

What it does.

Everything this tool handles, all of it inside your browser tab.

  • Accepts CIDR (/22) or a dotted subnet mask, and rejects non-contiguous masks
  • Network, broadcast, usable host range and host count
  • Subnet mask, wildcard mask, integer, hex and reverse-DNS name
  • Colour-coded binary view of network and host bits
  • Recognises RFC 1918, CGNAT, loopback, link-local, documentation and multicast ranges
  • Split into smaller subnets with a slider (up to 12 bits deeper)
  • /31 and /32 handled per RFC 3021
  • IPv6: compressed and expanded forms, prefix range, /64 count, address type and splitting
  • Runs entirely in your browser: no lookups, no sign-up

Worked examples.

  • A /26 in a private range

    192.168.10.77/26
    
    > Network       192.168.10.64/26
    > Usable hosts  192.168.10.65 - 192.168.10.126 (62)
    > Broadcast     192.168.10.127
    > Mask          255.255.255.192
    > Wildcard      0.0.0.63
    > Type          Private (RFC 1918)

    26 network bits leave 6 host bits: 64 addresses, 62 usable.

  • Subnet mask to prefix

    172.16.5.4 255.255.252.0
    
    > Network       172.16.4.0/22
    > Usable hosts  172.16.4.1 - 172.16.7.254 (1,022)
    > Broadcast     172.16.7.255

    255.255.252.0 has 22 one-bits, so it is a /22 spanning four /24s.

  • Split a /24 into four /26s

    10.20.0.0/24 split into /26
    
    > 10.20.0.0/26    .1 - .62     broadcast .63
    > 10.20.0.64/26   .65 - .126   broadcast .127
    > 10.20.0.128/26  .129 - .190  broadcast .191
    > 10.20.0.192/26  .193 - .254  broadcast .255

    Each extra prefix bit doubles the number of subnets and halves their size.

  • A /31 point-to-point link

    203.0.113.8/31
    
    > Usable hosts  203.0.113.8 - 203.0.113.9 (2)
    > Broadcast     None (RFC 3021)

    Both addresses are usable on a point-to-point link, instead of zero with the classic minus-two rule.

  • An IPv6 /48 site

    2001:db8:abcd::/48
    
    > First   2001:db8:abcd::
    > Last    2001:db8:abcd:ffff:ffff:ffff:ffff:ffff
    > /64s    65,536
    > Type    Documentation (RFC 3849)

    16 bits between /48 and /64 give a site 65,536 LAN subnets.

What the calculator shows

For an IPv4 address and prefix it returns the network address, the usable host range, the broadcast address, the number of usable hosts and total addresses, the subnet mask, the wildcard mask, the address type (private, public, documentation and so on), the legacy class, the integer and hex forms and the reverse-DNS name. The binary view colours network bits and host bits so you can see exactly where the boundary falls.

The split slider divides the block into equal smaller subnets, up to 12 bits deeper, and lists each one with its host range and broadcast. Spaces around the slash are fine. Everything is plain arithmetic in your browser; nothing is looked up or sent anywhere.

CIDR notation in one minute

An IPv4 address is 32 bits. The prefix length after the slash says how many leading bits identify the network; the rest identify hosts. A /24 leaves 8 host bits, so it holds 2^8 = 256 addresses. The subnet mask is the same idea written as an address: /24 is 255.255.255.0, /26 is 255.255.255.192. The 1 bits must be contiguous, so 255.0.255.0 is not a valid mask and the calculator says so.

The wildcard mask is the inverse of the subnet mask (0.0.0.63 for a /26). Cisco access lists and OSPF network statements use it. Usable hosts are the total minus two, because the all-zeros host address names the network and the all-ones address is the broadcast. Prefixes are also how routes are summarised: a router can announce 10.20.0.0/22 instead of four /24s, as long as they are contiguous and aligned.

Subnetting by hand, to check the maths

To verify a result or answer an exam question, find the block size first: 256 minus the last mask octet that is not 255. For 255.255.255.192 that is 64, so networks start at .0, .64, .128 and .192. The address 192.168.10.77 falls in the block starting at .64, so the network is .64, the broadcast is one less than the next block (.127) and hosts run from .65 to .126.

The same trick works in any octet. A /20 has the mask 255.255.240.0, so the block size in the third octet is 256 - 240 = 16, and 10.1.37.9/20 belongs to 10.1.32.0/20, which runs to 10.1.47.255. Usable hosts are 2^(32 - prefix) - 2, so a /20 has 4,094.

For variable-length subnetting (VLSM), allocate the largest subnets first from the start of the block, then fill the remaining space with smaller ones, each aligned to its own size. The split table shows aligned boundaries, which is a quick way to see where a smaller subnet can legally start.

/31, /32 and the addresses clouds keep

RFC 3021 lets point-to-point links use a /31 with both addresses as hosts, since a two-node link needs no network or broadcast address. A /32 is a single host, common in firewall rules and routing tables. The calculator follows both conventions.

Cloud networks reserve more. AWS and Azure reserve five addresses in every subnet (the first four and the last), so a /24 gives 251 usable addresses there. Google Cloud reserves four per primary range, leaving 252. Budget for this when you size small subnets for load balancers or databases.

Private and special-purpose ranges

RFC 1918 sets aside 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private networks. 100.64.0.0/10 is shared space for carrier-grade NAT, 127.0.0.0/8 is loopback, 169.254.0.0/16 is link-local (also where cloud metadata services live), and 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 are reserved for documentation. 224.0.0.0/4 is multicast.

Overlapping private ranges are the most common cause of VPN and peering trouble, which is why many organisations allocate 10.x blocks centrally rather than team by team. The address type row recognises all of these, which helps when you are reading someone else's firewall rules or deciding whether an address in a log is internal.

Planning subnets for a VPC or office network

Start with a block large enough for growth, such as a /16 for a cloud VPC, and split it evenly: one subnet per availability zone and tier (public, private, data), with room left for zones and tiers you have not built yet. Make sure the range does not overlap your office network, VPN users or any network you may peer with later, because overlapping ranges cannot be routed and are painful to change.

Kubernetes changes the maths: with the AWS VPC CNI, for example, every pod takes an address from the subnet, so a small node subnet can run out of IPs long before it runs out of CPU. Our cloud consulting team plans these ranges as part of a landing zone, and Kubernetes for small teams covers when you need a cluster at all.

IPv6 prefixes in brief

IPv6 addresses are 128 bits, written as eight groups of four hex digits. Leading zeros in a group can be dropped and one run of zero groups can be replaced by ::. The calculator shows both forms, using the canonical text format of RFC 5952.

Subnetting is simpler than in IPv4 because space is plentiful. A single LAN is a /64 (stateless address autoconfiguration needs exactly that), a site commonly receives a /48 or /56, and there is no broadcast address. fe80::/10 is link-local, fc00::/7 holds unique local addresses (in practice fd00::/8) and 2001:db8::/32 is for documentation. The calculator counts how many /64s fit in your prefix and splits it into smaller prefixes.

IPv6 also removes NAT from most designs: each device gets a globally unique address, and the firewall, not address translation, decides what is reachable. For dual-stack networks, give each IPv4 subnet a matching /64 so the two address plans stay easy to correlate.

Questions, answered

Something else on your mind? Ask a consultant and get a reply within one business day.

How many usable hosts are in a /24?

254: 256 addresses minus the network and broadcast addresses. On AWS and Azure it is 251, because they reserve five addresses per subnet.

What is the difference between a subnet mask and a wildcard mask?

The wildcard mask is the bitwise inverse of the subnet mask: 255.255.255.0 becomes 0.0.0.255. Cisco ACLs and OSPF use wildcard masks.

Can I enter a subnet mask instead of a prefix?

Yes. Type the address, a space and the mask (10.0.0.7 255.255.252.0) or use a slash (10.0.0.7/255.255.252.0).

Why does a /31 have two usable hosts?

RFC 3021 allows /31 subnets on point-to-point links, where both addresses are hosts and no broadcast address is needed.

What are the private IPv4 ranges?

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918). 100.64.0.0/10 is shared space for carrier-grade NAT.

What is a /64 in IPv6?

The standard size for a single LAN segment. Stateless address autoconfiguration (SLAAC) requires it, so most networks never subnet smaller than a /64.

Do IP classes still matter?

Not for routing; classless CIDR replaced them in 1993. The calculator shows the legacy class only because older documentation and exams still mention it.

Does the calculator contact any server?

No. All calculations are local arithmetic in your browser; no address is looked up or sent.

More free tools.

All tools

Need tooling like this inside your product?

We build internal tools, developer platforms and APIs. Tell us what your team keeps doing by hand.