Start a project

Tool 89 of 100 · Network

Subnet Calculator (IPv4 & IPv6)

Type an address with a prefix and get the network, host range, masks and address type, then split it into smaller subnets or check whether an IP is inside.

Subnet Calculator (IPv4 & IPv6) at a glanceIllustration: 1, An IP range; 2, processed in your browser; 3, Hosts + subnets.Subnet Calculator (IPv4 & IPv6)/26 · 62 hosts1An IP range3Hosts + subnets2In yourbrowser
1 An IP range 2 processed on your device 3 Hosts + subnets

Subnet Calculator (IPv4 & IPv6)

Network

Value

Split, check and summarise

Subnets

Summarised ranges

01

What it does

IPv4 and IPv6 CIDR maths: network, range, masks, host counts and type, with splitting, summarising and membership checks.

  • IPv4 and IPv6 with exact BigInt maths
  • Network, broadcast, first and last host, masks and wildcard
  • Address type: private, CGNAT, loopback, documentation and more
  • Split into smaller subnets

02

Private by design

Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

03

What you get

Subnet tables and summarised ranges, with a Copy and a Download button on every result.

  • CIDR
  • IPv4
  • IPv6
  • Networking

Why it matters

Subnets come up everywhere in web work: firewall rules, cloud VPCs, allow-lists for webhooks and CDN origins, SPF records. Working out the host range of a /27 in your head is error-prone, and IPv6 prefixes are too long to do by hand at all.

This calculator does exact maths for both versions, tells you what kind of address it is, splits a block into smaller subnets and merges a messy list of ranges into the fewest CIDR blocks, which keeps firewall rules short.

How it works

  1. InputAn IPv4 or IPv6 address with a prefix
  2. In your browserCalculated with exact integer maths
  3. OutputRange, hosts, masks, subnets and a summary

Where it fits in a designer's workflow

  1. Plan
  2. Design
  3. Build
  4. Test
  5. Launch
Planning networks, firewalls and allow-lists.

By the numbers

Usable hosts per IPv4 prefix (log scale)/22: 1,022 usable; /24: 254 usable; /26: 62 usable; /28: 14 usable; /29: 6 usable; /30: 2 usable; /31: 2 usable; /32: 1 usable/221,022 usable/24254 usable/2662 usable/2814 usable/296 usable/302 usable/312 usable/321 usable
Calculated by this tool: each bit shorter doubles the range. Normally the first and last addresses are the network and broadcast, so a /24 has 254 usable; /31 links use both addresses (RFC 3021) and a /32 is one host. Source: RFC 4632: CIDR; RFC 3021: /31 links.
Show the numbers as a table
PrefixUsable hosts
/221,022
/24254
/2662
/2814
/296
/302
/312
/321

How to use it

  1. Type an address with a prefix, such as 192.168.10.0/24 or 2001:db8::/48.
  2. Read the network details.
  3. Split it into smaller subnets if you need to.
  4. Paste a list of ranges to summarise, or test an address.

FAQ

How many usable hosts are in a /24?

254: 256 addresses minus the network and broadcast addresses. /31 and /32 are special cases for point-to-point links and single hosts.

Does IPv6 have a broadcast address?

No. IPv6 uses multicast instead, so the tool shows the first and last address.

Can I use a netmask instead of a prefix?

Yes, for IPv4: 10.0.0.0 255.255.255.0 works the same as 10.0.0.0/24.

What's 100.64.0.0/10?

Shared address space for carrier-grade NAT (RFC 6598). It's not public and not normal private space either.

Work with me

Want a site that gets these right?

I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

All developer tools · Back to leej.uk