IP Subnet Calculator (IPv4 & IPv6)

Type an IPv4 or IPv6 network like 192.168.1.10/24 or 2001:db8::/48. Everything runs locally in your browser.

Network & Actions

Enter IP/prefix. Works with IPv4 and IPv6 (IPv4-embedded IPv6 supported).

Results

Results will appear here.

Tip: Try or .

Understanding IP Subnets (Beginner-Friendly Guide)

IP addresses can look intimidating, but subnetting is simply a way to organize them so networks stay clean and predictable. This IP subnet calculator helps you translate a single address and prefix into practical details like network address, broadcast address, usable host range, and total hosts. Whether you are setting up a home router, planning office VLANs, or studying for a networking exam, it gives you a fast, reliable breakdown without manual math.

What is CIDR?

CIDR notation writes a network as IP/prefix, such as 192.168.1.10/24 for IPv4 or 2001:db8::/48 for IPv6. The prefix length tells you how many bits belong to the network portion. A larger prefix (like /28) means a smaller subnet with fewer available addresses, while a smaller prefix (like /16) means a larger subnet.

IPv4 vs IPv6 at a glance

  • IPv4: 32-bit addresses like 203.0.113.25. Includes a broadcast address and a count of usable hosts. IPv4 space is limited, so subnetting and NAT are common.
  • IPv6: 128-bit addresses like 2001:db8::1. No broadcast (uses multicast), and the address space is enormous, making hierarchical planning easier.

How usable hosts are calculated (IPv4)

In IPv4, most subnets reserve the first address as the network address and the last as the broadcast address. That is why usable hosts are usually total − 2. Two special cases are common in real deployments and appear in results:

  • /31: point-to-point — both addresses usable.
  • /32: single host.

How to use this calculator

  1. Enter an IPv4 or IPv6 address and its prefix length.
  2. Choose the appropriate version if prompted.
  3. Review the calculated network, broadcast (IPv4), and usable range.
  4. Use the total hosts and mask to size your subnet.
  5. Adjust the prefix to compare larger or smaller networks.

Choosing a prefix length

  • Smaller number (e.g., /16) → larger network, useful for many devices or growth.
  • Larger number (e.g., /28) → smaller network, good for tight segmentation.
  • IPv6 best practice: LANs use /64; sites often receive /48 or /56 for clean hierarchy.

Quick References

IPv4

PrefixSubnet MaskUsable HostsTotal
/24255.255.255.0254256
/25255.255.255.128126128
/26255.255.255.1926264
/27255.255.255.2243032
/28255.255.255.2401416
/29255.255.255.24868
/30255.255.255.25224
/31255.255.255.2542*2
/32255.255.255.2551*1

*Special cases: /31 point-to-point (2 usable), /32 single host.

IPv6

PrefixAddressesTypical use
/48280Large site allocation
/56272Small site allocation
/64264Standard LAN / SLAAC networks
/1281Single interface address

5 Fun Facts about IP Subnets

IPv4 is tiny by design

All of IPv4 (4.29 billion addresses) could fit inside a single /8 of IPv6—less than one 256th of one percent of IPv6 space.

Space comparison

/64 is the IPv6 magic number

IPv6 LANs are almost always /64 because SLAAC (stateless autoconfig) assumes 64 host bits for making addresses from MACs.

Auto addressing

Broadcast is an IPv4 thing

IPv6 dropped broadcast entirely and leans on multicast groups instead (e.g., ff02::1 for “all nodes”).

Multicast life

/31 saves addresses

Point-to-point IPv4 links often use /31 so both addresses are usable—no wasted network or broadcast slot.

Link efficiency

World per-capita addresses

IPv6 offers about 4.8×1028 addresses per human on Earth right now; IPv4 offers fewer than one per person.

Scale shock

Explore more tools