1001Ferramentas
🌐 Dev

IPv4 Subnet Calculator

Calculate IPv4 subnets with CIDR notation. Enter an IP address and prefix (e.g. 192.168.1.0/24) to get the network address, broadcast, host range, subnet mask and binary representation.

Exemplos:

Como usar

Digite um endereço IP com prefixo CIDR (ex: 192.168.1.0/24). O prefixo indica quantos bits pertencem à rede — /24 = 256 endereços, 254 hosts utilizáveis. /32 = host único. /30 = 4 IPs (ideal para links ponto-a-ponto).

CIDR math without binary on paper

Splitting a network into smaller blocks, checking whether two IPs share a subnet or sizing how many hosts fit in a /26 all require converting addresses to binary and applying a mask, and doing that in your head is how mistakes happen. Type the IP with its CIDR prefix (e.g. 192.168.1.64/26) and get the network address, broadcast, first and last host, usable host count, subnet mask and the binary breakdown all at once.

A /n prefix yields 2 to the power of (32-n) addresses, minus 2 usable hosts, because the first address names the network and the last one is the broadcast. The exception many calculators ignore: on a /31, used for point-to-point links (RFC 3021), both addresses are usable, and /32 means a single host; this tool handles both correctly. It also shows the wildcard mask (the inverse), which is the format Cisco ACLs and OSPF configuration expect.

The binary view is the fastest way to see why 192.168.1.64/26 runs from .64 to .127: the first 26 bits stay fixed and the remaining 6 vary. Try the built-in examples (/8, /16, /24, /26, /30) to build intuition for block sizes. IPv4 only: IPv6 prefix logic is different and there is no broadcast address there. Everything is computed in your browser, and no address you type is sent to any server.

Frequently asked questions

Why does a /24 have 254 hosts instead of 256?
Out of 256 addresses, the first (.0) identifies the network and the last (.255) is the broadcast. That leaves 254 for machines.
What is a wildcard mask?
The inverted subnet mask (0.0.0.255 for a /24). Cisco gear uses this format in ACLs and OSPF network statements instead of the regular mask.
Does it work with IPv6?
No, IPv4 only. IPv6 uses prefixes up to /128, has no broadcast address and the math works differently.

Related Tools