IP Subnet Calculator

IPv4 and IPv6 subnet calculator: network, broadcast, netmask, host range, address count and address type from CIDR or IP + mask input.

Your inputs and files stay in your browser

Examples
Network details

Enter an address with a prefix or mask, or pick an example, to see the network, host range and address count.

Hosts

Total:

Address space
Address
Netmask
Wildcard Mask
Network
Broadcast
Host Min
Host Max
Class
Binary
Address
Netmask
On this page

Calculate IPv4 and IPv6 subnets from CIDR notation: network address, prefix mask, host or address range and the exact number of addresses. For IPv4 you can also enter a dotted netmask and get the broadcast, wildcard mask and a binary view.

Detailed Functionality

For IPv4, enter 192.168.1.10/24, an address followed by a dotted mask (192.168.1.10 255.255.255.0) or a bare address, which is treated as /32. The table shows the address, netmask, wildcard mask, network with prefix, broadcast, first and last usable host, usable and total host counts, the historical class (A–E) and the address type: private (RFC 1918), shared CGNAT space (100.64.0.0/10), loopback, link-local, documentation, multicast, reserved or public. A /31 is treated as a point-to-point link with two usable addresses (RFC 3021), a /32 as a single host.

Any input containing a colon is treated as IPv6: 2001:db8::1/64 or a bare address (/128). You get the address in compressed (RFC 5952) and fully expanded form, the network, the prefix mask, the first and last address of the prefix and the exact address count — up to 2^128, printed in full. IPv6 has no broadcast address, so every address of the prefix is counted. The type badge marks global unicast, unique local (fc00::/7), link-local (fe80::/10), multicast, documentation (2001:db8::/32), loopback and other special ranges.

Split into subnets divides the calculated network into equal subnets with a longer prefix — for example a /24 into four /26 or an IPv6 /48 into /64 subnets. You get the total number of subnets (exact for IPv6 too), the addresses per subnet and a table with the host range of each subnet (IPv4 also shows the broadcast); at most the first 256 subnets are listed, and Copy list copies them in CIDR form.

The maths runs in a small WebAssembly module compiled from Rust. It is downloaded the first time you press Calculate, and the addresses you type are never sent anywhere. Zone IDs such as fe80::1%eth0 and address ranges like 10.0.0.1-10.0.0.9 are not accepted.

Practical Examples

Office LAN: 192.168.1.10/24 gives network 192.168.1.0/24, broadcast 192.168.1.255, hosts 192.168.1.1–192.168.1.254 (254 usable) and the type Private.

Mask instead of a prefix: 172.16.0.1 255.240.0.0 is recognised as /12 — network 172.16.0.0, broadcast 172.31.255.255, 1,048,574 usable hosts.

Point-to-point link: 10.0.0.1/31 yields two usable addresses, 10.0.0.0 and 10.0.0.1, because RFC 3021 drops the network/broadcast reservation for /31.

IPv6 /64: 2001:db8:abcd:12::1/64 gives network 2001:db8:abcd:12::, last address 2001:db8:abcd:12:ffff:ffff:ffff:ffff, 18,446,744,073,709,551,616 addresses (2^64) and the type Documentation.

How to Use This Tool

  1. Enter an address

    Type an IPv4 or IPv6 address into IP Address / CIDR — with a prefix (10.20.30.40/22, 2001:db8::/48) or, for IPv4, with a dotted mask after a space.

  2. Calculate

    Press Calculate or Enter. You can also click one of the Examples to fill the field and calculate in one go.

  3. Read and copy the result

    Check the network, range and address count in the table, then use the copy icons next to the network and the broadcast (IPv6: last address).

Tips and Best Practices

  • The address does not have to be the network address: 10.20.30.40/22 is normalised to the network 10.20.28.0.
  • A bare IPv4 address is treated as /32, a bare IPv6 address as /128.
  • The type badge describes the address you typed: 100.64.0.1 is Shared (CGNAT), not Public, even though it is not RFC 1918 private.
  • IPv6 LAN subnets are normally /64; /127 is used for point-to-point links (RFC 6164).
  • The binary view (IPv4 only) shows exactly where the mask splits network and host bits.