Dual-Stack CIDR Calculator

Dual-stack CIDR calculator: work out IPv4 masks and IPv6 prefixes on one page, with network ranges, host counts, and copy-ready CIDR.

Dual-stack CIDR calculator

Work out an IPv4 subnet and an IPv6 prefix on one page. Each side updates independently.

IPv4

Presets
192.168.1.0/24
254 usable hosts · Private
Total addresses
256
Usable hosts
254
Wildcard
0.0.0.255
Integer / hex
3232235786 / 0xC0A8010A
  • Private

Binary (network bits bold)

Network
192.168.1.0
Broadcast
192.168.1.255
Subnet mask
255.255.255.0
Usable range
192.168.1.1 – 192.168.1.254
PTR (in-addr.arpa)
10.1.168.192.in-addr.arpa

Adjacent networks

Previous
192.168.0.0/24
Next
192.168.2.0/24

Split in half

First half
192.168.1.0/25
Second half
192.168.1.128/25

IPv6

Presets
2001:db8::/64
2^64 addresses · Documentation
Host bits
64
Addresses
2^64
Prefix length
64
  • Documentation
Compressed
2001:db8::1
Expanded
2001:0db8:0000:0000:0000:0000:0000:0001
Network
2001:db8::
First address
2001:db8::
Last address
2001:db8::ffff:ffff:ffff:ffff
PTR (ip6.arpa)
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa

Adjacent networks

Previous
2001:db7:ffff:ffff::/64
Next
2001:db8:0:1::/64

Split in half

First half
2001:db8::/65
Second half
2001:db8:0:0:8000::/65

Runs in your browser. Nothing is uploaded.

Dual-stack means IPv4 and IPv6 on the same L2 network, not one combined CIDR. Use this dual-stack CIDR calculator to plan a mask and a prefix side by side. This page is part of the networking tools on TechOpt.io. Dedicated pages: IPv4 CIDR calculator and IPv6 CIDR calculator.

What a dual-stack CIDR calculator is for

Hosts on one VLAN get an IPv4 address (often from DHCP on a /24) and an IPv6 address (often SLAAC on a /64), which is the dual-stack model in RFC 4213. Firewall rules, reverse DNS, and documentation need both. The calculators on this page keep independent shareable URLs (ip4/p4 and ip6/p6) so you can send one link with both sides filled in.

Planning a homelab VLAN

A common pattern is 192.168.10.0/24 plus a /64 from your ULA or ISP prefix, for example fd12:3456:789a:a::/64 or 2001:db8:1:a::/64. Keep the IPv4 third octet and the IPv6 subnet ID related if it helps you remember them — that is a human convention, not a protocol rule.

IPv4-mapped addresses

::ffff:192.0.2.1 is an IPv4 address written inside IPv6 for socket APIs. Paste it into the IPv6 calculator to see the IPv4-mapped flag. It does not give the LAN real IPv6 connectivity.

FAQ

When should I use a dual-stack calculator?

When the LAN has both IPv4 and IPv6, which is most home labs and many VPS networks. Plan the IPv4 /24 (or whatever you actually use) next to the IPv6 /64 so DHCP, SLAAC, and firewall rules line up.

Can I mix IPv4 and IPv6 in the same subnet?

They share the same L2 segment, not the same numbering plan. An IPv4 /24 and an IPv6 /64 on one VLAN is dual-stack. Hosts get both; they are not one CIDR. Do not try to “convert” 192.168.1.0/24 into a /64 bit-for-bit.

What IPv4 prefix is like an IPv6 /64?

Nothing really. A /64 has 2^64 addresses, far beyond any IPv4 LAN. Operationally a /64 is “one LAN,” the way a /24 often is in IPv4 — similar role, wildly different size. Provider allocations are commonly /32, /48, or /56.

What is IPv4-mapped IPv6?

::ffff:0:0/96 embeds an IPv4 address in IPv6, for example ::ffff:192.0.2.1. Sockets APIs use it on IPv6-only stacks talking to IPv4 peers. It is not a substitute for running real IPv6 on the LAN.

Does this dual-stack calculator upload my addresses?

No. It runs entirely in your browser. IPv4 and IPv6 values never leave your machine.

Looking for more networking how-tos? Browse the servers and networking guides or the rest of the tools.