🌐

Subnet Calculator

Calculate network subnets, IP ranges, and subnet divisions

Subnet Calculator Guide

A subnet calculator computes network address, broadcast, usable host range, and host count from an IPv4 or IPv6 address in CIDR notation. It helps network engineers design and document address plans quickly and without mistakes.

What is Subnet Calculator?

The subnet calculator parses addresses like 192.168.10.14/24 or 2001:db8::/48, extracts the prefix length, and derives network properties: host range, total addresses, and the next/previous subnets.

How to Use the Subnet Calculator

  1. Enter an IP (IPv4 or IPv6) with /prefix.
  2. Calculate network address, first/last usable (IPv4), and broadcast (IPv4).
  3. See host counts and block size; list adjacent subnets.
  4. Toggle between dotted-decimal masks (e.g., 255.255.255.0) and /n.
  5. (Optional) summarize or split networks by changing prefix length.

Formulas & Methods

  • IPv4 host bits: h = 32 - n; block size: 2^h addresses.
  • Usable hosts (legacy): 2^h - 2 (excluding network and broadcast). Some modern networks allow /31 point-to-point and /32 loopback.
  • Masks: build dotted decimal by setting first n bits to 1.
  • IPv6: 128-bit addresses; typical LAN prefix /64. No broadcast; compute network and host range conceptually.
  • Subnetting: increase n to create smaller subnets; supernetting decreases n to aggregate.

Assumptions & limitations

  • IPv4 private ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16.
  • IPv6 documentation prefix: 2001:db8::/32.
  • Usable host rules depend on environment (e.g., /31 P2P); adjust accordingly.

Examples

Example A — IPv4 /24
Input 192.168.10.14/24.
Network 192.168.10.0; broadcast 192.168.10.255; usable 192.168.10.1-192.168.10.254 (254 hosts).

Example B — IPv4 /26
10.0.5.65/26 -> block size 64 addresses; network 10.0.5.64; broadcast 10.0.5.127; usable 65-126 (62 hosts).

Example C — IPv6 /64
2001:db8:1:2::abcd/64 -> network 2001:db8:1:2::/64; host space 2^64 addresses.

| Prefix | Addresses | Usable (IPv4) | |---|---:|---:| | /24 | 256 | 254 | | /26 | 64 | 62 | | /30 | 4 | 2 |

Pro Tips & Best Practices

  • Default to /64 for IPv6 subnets to enable SLAAC unless you have a specific reason to vary.
  • Reserve room for growth; avoid subnets that run near 100% utilization.
  • Use VLSM to size subnets efficiently; document allocations clearly.
  • For WAN P2P, /31 (IPv4) conserves addresses; verify gear support.
  • Keep a consistent naming scheme for networks and VRFs.

Related Calculators

FAQ

Q: What is CIDR notation?

A: Classless Inter-Domain Routing uses a slash and prefix length (e.g., /24) to denote how many bits are network vs host.

Q: How many hosts are in a subnet?

A: For IPv4 /n, usable hosts are 2^(32-n) - 2 (excluding network and broadcast) in traditional schemes.

Q: What is the network and broadcast address?

A: The network address has all host bits 0; the broadcast has all host bits 1 for IPv4.

Q: Do IPv6 subnets have broadcast addresses?

A: No—IPv6 does not use broadcast; it uses multicast.

Q: How do I find the next subnet?

A: Increment the network address by the block size: block = 2^(host bits).

Engineering note: Uses CIDR addressing for IPv4/IPv6. IPv4 examples assume traditional network/broadcast semantics unless /31//32 is specified.

Call to Action

Enter any IPv4/IPv6 address with a prefix to see its network, usable range, and adjacent subnets—then adjust the prefix to plan your addressing.