IP calculator
Calculate a subnet and inspect its bits. Represent IPv4 as IPv6 or recover IPv4 from a mapped address.
Input
Use a prefix from 0-32 or a mask such as 255.255.255.0. You can paste an address with /24.
Private subnet 192.168.1.0/24 has 256 addresses and conventionally 254 host addresses. The first is the network address and the last is broadcast.
A /31 contains both ends of a point-to-point link; a /32 contains one address. Neither has a separate broadcast address.
Results
IPv4- Input address
192.168.1.42Private (RFC 1918)- Network / CIDR
192.168.1.0/24- Subnet mask
255.255.255.0/24, network bits: 24- Wildcard mask
0.0.0.255- Broadcast
192.168.1.255- Host range
192.168.1.1 - 192.168.1.254Excluding the network and broadcast addresses.- Host count
2542^8 − 2- Address count
2562^8, the entire subnet address space
IPv4 ↔ IPv6 address conversion
IPv4 → IPv6This converts the address entered above. IPv4 is represented as an IPv4-mapped address with the ::ffff: prefix. The reverse operation extracts IPv4 from that format, including hexadecimal notation.
- IPv4-mapped IPv6 address
::ffff:192.168.1.42The final 32 bits contain the original IPv4 address.- Expanded IPv6 address
0000:0000:0000:0000:0000:ffff:c0a8:012a
This converts the representation of one address. It does not change the connection protocol or subnet prefix. NAT64 requires its own prefix and network configuration; this converter does not support it.
Bit allocation
24 network bits + 8 host bits = 32 bits.
Network = address AND mask. Ones in the mask preserve network bits; zeros clear host bits.
Calculations run in your browser. Addresses are never sent anywhere.