DNS Checker.eu

IP Subnet Calculator

Work out the network address, broadcast, usable host range and mask for any IPv4 or IPv6 block from an address and a prefix length - computed instantly in your browser.

Subnet calculator (IPv4 & IPv6)

Enter any address plus a prefix length. The family is detected automatically and every value is derived in your browser.

About IP Subnet Calculator

The IP Subnet Calculator takes an IP address and a CIDR prefix length (the number after the slash, such as /24) and derives every property of the subnet it belongs to. It detects automatically whether you typed an IPv4 or an IPv6 address, so you can move between the two families without switching modes. For IPv4 it returns the network address, subnet mask, wildcard mask, broadcast address, the first and last usable host, the total address count and the number of assignable hosts. For IPv6 it returns the compressed and fully expanded network prefix, the first and last address in the block, the total address count as a power of two, and how many /64 subnets the prefix contains.

A prefix of /24 means the first 24 bits identify the network and the remaining 8 bits address hosts, giving a 255.255.255.0 mask and 256 total addresses. Two of those - the network and the broadcast address - are reserved, so a /24 offers 254 usable hosts. The wildcard mask (the bitwise inverse of the subnet mask, for example 0.0.0.255) is the form that access-control lists and OSPF configurations expect. The calculator follows RFC 3021 for /31 point-to-point links and treats /32 as a single host route, reporting both usable addresses in those cases instead of subtracting a phantom broadcast.

IPv6 has no broadcast address and reserves no host addresses within a prefix, so every address in the block is usable. For IPv6 the tool instead shows the block boundaries and the /64 subnet count, since /64 is the standard size for a single LAN segment. A built-in reference table maps every IPv4 prefix from /8 to /32 to its dotted-decimal mask and host count for quick lookups without re-running a calculation.

Because this is a client-side tool, every value is derived by JavaScript running on your own machine. The address you enter never leaves the browser or reaches our EU servers, which matters when you are planning internal network ranges you would rather not disclose to any third party.

How to use it

  1. 1Type an IPv4 address (for example 192.168.1.10) or an IPv6 address (for example 2001:db8::1) into the address field.
  2. 2Set the prefix length - the CIDR number after the slash, from 0 to 32 for IPv4 or 0 to 128 for IPv6.
  3. 3Read the derived network address, subnet mask, wildcard mask, broadcast address and usable host range as they update.
  4. 4Copy the full breakdown from the monospace block, or open the IPv4 prefix reference table to compare mask against host count.

Common use cases

  • -Planning how to carve a larger allocation into smaller subnets and confirming host counts before assigning ranges.
  • -Translating between a subnet mask, a CIDR prefix and a wildcard mask when configuring routers, firewalls or ACLs.
  • -Finding the broadcast address and usable range of a network segment during troubleshooting.
  • -Sizing IPv6 allocations and counting the /64 segments available inside a delegated prefix.
  • -Teaching or learning how CIDR notation, netmasks and binary boundaries relate to one another.

Frequently asked questions

What is a subnet calculator?
A subnet calculator turns an IP address and a CIDR prefix into the full set of subnet properties: network and broadcast addresses, subnet and wildcard masks, the usable host range and the total number of addresses. This tool does it for both IPv4 and IPv6 directly in your browser.
How many usable hosts are in a /24?
A /24 contains 256 total addresses but 254 usable hosts, because the first address is the network identifier and the last is the broadcast address. The rule 2^(32 minus prefix) minus 2 applies to any IPv4 prefix shorter than /31.
What is a wildcard mask?
A wildcard mask is the bitwise inverse of a subnet mask: where the mask has 1 bits the wildcard has 0, and vice versa. For a /24, the subnet mask 255.255.255.0 corresponds to the wildcard 0.0.0.255, the form Cisco ACLs and OSPF expect.
How do I convert a subnet mask to a CIDR prefix?
Count the consecutive 1 bits in the mask: 255.0.0.0 is /8, 255.255.0.0 is /16 and 255.255.255.0 is /24. The calculator's reference table lists every IPv4 mask from /8 to /32 next to its prefix.
Do /31 and /32 subnets have usable hosts?
Yes. Following RFC 3021, a /31 provides two usable addresses for point-to-point links with no broadcast, and a /32 describes a single host route. This calculator reports those addresses rather than subtracting a network and broadcast pair.
Does IPv6 have a broadcast address?
No. IPv6 has no broadcast address and reserves no host addresses within a prefix, so every address in the block is usable. For IPv6 this tool shows the first and last address, the total count and how many /64 subnets fit inside the prefix.