IP Subnet Calculator

Enter an IPv4 address and prefix length to see the network, mask, host range and broadcast.

Free, no sign-upInstant resultsUpdated October 2026
Network
–
How we calculated this

    For estimating and educational purposes only. Results are approximate and are not a substitute for a licensed professional, the manufacturer's instructions or your local code. Disclaimer

    Embed this calculator on your site

    Free for any website or blog. Copy the code below and paste it into an HTML block. Keep the credit link.

    Need more detail? Try the advanced subnet calculator on taap.digital, our network engineering toolkit (VLSM, IPv6, TCP throughput, PoE and fiber).

    Transmission tower under a cloudy sky
    Transmission tower under a cloudy skyPhoto: CHRSNDRSN / Unsplash

    How subnetting works

    An IPv4 address has 32 bits. The prefix length (for example /24) says how many leading bits identify the network; the remaining bits number the hosts. The first address in a subnet is the network address and the last is the broadcast address, so usable hosts = 2host bits − 2.

    Network = IP AND Mask Broadcast = Network OR Wildcard Hosts = 2^(32 − prefix) − 2

    Subnet cheat sheet

    CIDRMaskUsable hosts
    /30255.255.255.2522
    /29255.255.255.2486
    /28255.255.255.24014
    /27255.255.255.22430
    /26255.255.255.19262
    /25255.255.255.128126
    /24255.255.255.0254
    /23255.255.254.0510
    /22255.255.252.01,022
    /16255.255.0.065,534

    Private address ranges (RFC 1918)

    10.0.0.0/8 · 172.16.0.0/12 · 192.168.0.0/16. These are not routed on the public internet.

    Frequently asked questions

    How many hosts are in a /24?

    254 usable hosts out of 256 addresses.

    What is a wildcard mask?

    The inverse of the subnet mask, used in Cisco ACLs and OSPF. For /24 it is 0.0.0.255.

    Why does /31 have 2 usable hosts?

    RFC 3021 allows /31 on point-to-point links, where no network or broadcast address is needed.