IP & subnet calculator

    Prefix length /24
    /0 /8 /16 /24 /32
    Advertisement

    How does the IP & subnet calculator work?

    An IP subnet calculator works out the boundaries of any IPv4 network from its CIDR notation β€” the slash number that tells you how many bits belong to the network. Whether you're planning firewall rules, designing a VPC, or double-checking a network config, this tool gives you the network address, broadcast address, usable host range, and wildcard mask without having to count bits manually.

    CIDR notation and prefix length

    CIDR (Classless Inter-Domain Routing) notation writes a network as an IP address followed by a slash and a number β€” the prefix length β€” showing how many of the address's 32 bits are fixed as the network portion. A shorter prefix (e.g. /8) covers far more addresses than a longer one (e.g. /24). The bits display shows exactly which bits are network and which are host, which makes the /notation click a lot faster than any table.

    Network, broadcast and usable hosts

    The network address is the first address in a block (all host bits zero) and identifies the subnet itself β€” it can't be assigned to a device. The broadcast address is the last address (all host bits one) and is reserved for sending to every host on the subnet. Everything in between is usable. Two special cases: a /31 has no network or broadcast address and both its addresses are usable (RFC 3021, typically used for point-to-point links), and a /32 is a single host address with no other addresses to allocate.

    Private, public and reserved ranges

    IANA reserves three blocks for private use that never appear on the public internet: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. Addresses outside those (and outside the loopback and link-local ranges) are treated as publicly routable. This calculator flags which range an address falls into, and its traditional class (A/B/C/D/E) β€” though classful addressing was superseded by CIDR in 1993 and today's routing doesn't actually use address class.

    Range to CIDR and subnet division

    "Range to CIDR" finds the smallest set of CIDR blocks that exactly covers an arbitrary start–end IP range β€” a range that isn't already aligned to a power-of-two boundary needs more than one block to describe exactly. "Subnet division" splits one parent network into equal-sized child subnets at a longer prefix length, which is how a single allocated block gets carved up for multiple departments, VLANs, or sites.

    CIDR notation is defined by IETF RFC 4632; private address ranges by IETF RFC 1918.