Skip to main content

Free IP Subnet Calculator – Network, Broadcast & Host Range Instantly

Calculate network address, broadcast, first and last usable hosts, wildcard mask, and total host count from any IPv4 address and prefix length or subnet mask.

Written & reviewed by Helperzy Editorial Team · Updated July 2026

Network & BroadcastFirst/Last HostBinary Breakdown/31 & /32 CorrectFree

A "/prefix" typed in the address field always wins over this box.

192.168.1.0/24

Network address · Class C · Private (RFC 1918)

192.168.1.255

Broadcast Address

192.168.1.1192.168.1.254

First – Last Usable Host

255.255.255.0

Subnet Mask (/24)

0.0.0.255

Wildcard Mask

256

Total Addresses

254

Usable Hosts

Binary Breakdown

Address11000000101010000000000100001010
Mask11111111111111111111111100000000

Bold/indigo bits (1–24) are the network portion; the rest are host bits. The vertical line marks the network/host boundary at /24.

Yes, inside this subnet

Compares 192.168.1.200 & 255.255.255.0 against the network address 192.168.1.0 — same network address means the IP belongs to the subnet, regardless of whether it is the network, broadcast or a usable host.

Mask ⇄ Prefix Quick Reference (/8–/32)

PrefixDotted MaskUsable Hosts
/8255.0.0.016,777,214
/9255.128.0.08,388,606
/10255.192.0.04,194,302
/11255.224.0.02,097,150
/12255.240.0.01,048,574
/13255.248.0.0524,286
/14255.252.0.0262,142
/15255.254.0.0131,070
/16255.255.0.065,534
/17255.255.128.032,766
/18255.255.192.016,382
/19255.255.224.08,190
/20255.255.240.04,094
/21255.255.248.02,046
/22255.255.252.01,022
/23255.255.254.0510
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522
/31255.255.255.2542 (RFC 3021, no broadcast)
/32255.255.255.2551 (single host, no broadcast)

100% Private

All subnet math runs as plain bitwise arithmetic in your browser. Nothing you type is uploaded anywhere.

How to Use IP Subnet Calculator

1

Enter an IPv4 Address

Type or paste any valid IPv4 address in dotted-decimal notation (like 192.168.1.50). The tool validates the format and each octet's 0–255 range before computing anything.

2

Specify the Prefix Length or Subnet Mask

Enter a CIDR prefix (/0 through /32) or a dotted-decimal subnet mask like 255.255.255.0. The tool auto-detects which format you typed and converts between them.

3

Read the Complete Subnet Details

The tool displays the network address, broadcast address, first and last usable host, wildcard mask, usable host count, and a binary breakdown showing exactly which bits are network vs host.

How the IP Subnet Calculator Works and Why Subnetting Matters

An IP subnet calculator takes an IPv4 address paired with a prefix length (like /24) or a dotted subnet mask (like 255.255.255.0) and derives the complete set of addressing facts about that subnet: the network address, the broadcast address, the first and last usable host addresses, the wildcard mask used in access-control lists, and the total number of assignable hosts. Network engineers, students studying for the CCNA, and system administrators configuring routers, firewalls, or DHCP scopes use this tool dozens of times a day because subnetting arithmetic, while straightforward, is tedious to do by hand and a single bit-flip mistake cascades into wrong routing or firewall rules. Subnetting works by dividing the 32-bit IPv4 address space into a network portion (the leftmost bits, identified by the prefix length) and a host portion (the remaining bits). The subnet mask is a contiguous run of 1-bits followed by 0-bits; ANDing it with the IP address yields the network address. Setting all host bits to 1 gives the broadcast address (RFC 922), and the first/last usable host addresses are network+1 and broadcast−1 respectively, except for the special cases of /31 (RFC 3021, point-to-point links with 2 usable hosts and no broadcast) and /32 (single host route). The wildcard mask is the bitwise complement of the subnet mask, used in Cisco IOS ACLs and OSPF network statements to specify which bits should be ignored during matching. Consider the address 192.168.10.50/26. The prefix length /26 means the first 26 bits are network and the last 6 are host, giving 2^6 = 64 total addresses. The subnet mask is 255.255.255.192 (binary: 26 ones followed by 6 zeros). ANDing 192.168.10.50 with this mask gives the network address 192.168.10.0, and setting the host bits to all-ones gives broadcast 192.168.10.63. The first usable host is 192.168.10.1 and the last is 192.168.10.62, for a total of 62 assignable hosts (64 minus the network and broadcast addresses). The wildcard mask is 0.0.0.63, which you would use in a Cisco ACL to match any host in that subnet. System administrators use this when planning a DHCP scope: knowing the exact first and last usable address avoids accidentally assigning the network or broadcast address to a device, which would silently break its connectivity. Firewall engineers typing a permit rule need the wildcard mask, not the subnet mask, and getting it wrong means the rule matches the wrong range of addresses — too narrow blocks legitimate traffic, too wide opens a security hole. Students practising variable-length subnet masking (VLSM) use the tool's binary breakdown display to visualise exactly where the network/host boundary falls, reinforcing the bit-level intuition that subnetting ultimately requires. Cloud architects planning VPC CIDR allocations in AWS or Azure check host counts at each prefix length to right-size subnets and avoid running out of addresses mid-deployment. A common mistake is forgetting that /31 networks are legitimate for point-to-point links (RFC 3021) and do not waste two addresses on network and broadcast like longer subnets do — this tool correctly handles /31 by reporting 2 usable hosts with no broadcast, and /32 as a single-host route. Another frequent error is confusing the wildcard mask with the subnet mask when writing router rules — they are bitwise opposites, and swapping them silently matches the wrong range of addresses. The tool shows both side by side so you can copy the correct one. All calculations are performed locally using 32-bit unsigned integer arithmetic in your browser, with no data transmitted anywhere. The shared helper library uses the unsigned right-shift operator (>>> 0) after every bitwise operation to keep values in the correct unsigned 32-bit range, avoiding the sign-extension bugs that plague naive JavaScript implementations of IPv4 math. Because the math is exact and runs offline, you can safely use it on production addressing plans without exposing your internal network layout to any third party.

IP Subnet Calculator Formula & Method

Network = IP AND mask. Broadcast = IP OR (NOT mask). First host = Network + 1. Last host = Broadcast − 1. Usable hosts = 2^(32−prefix) − 2 (for prefix ≤ 30). /31: 2 usable (RFC 3021). /32: 1 host (single route). Wildcard = NOT mask (bitwise complement).

Examples: IP Subnet Calculator

Input

192.168.10.50/26

Result

Network: 192.168.10.0, Broadcast: 192.168.10.63, Hosts: 62, Wildcard: 0.0.0.63

26-bit mask → 6 host bits → 2^6=64 addresses → 62 usable. 50 AND 192=0 gives the network; setting 6 host bits to 1 gives broadcast .63.

Input

10.0.0.1/8

Result

Network: 10.0.0.0, Broadcast: 10.255.255.255, Hosts: 16,777,214, Wildcard: 0.255.255.255

A full Class A private range (RFC 1918). 24 host bits → 2^24−2 = 16,777,214 usable addresses.

Input

172.16.5.3/31

Result

Network: 172.16.5.2, Hosts: 2 (point-to-point, no broadcast), Wildcard: 0.0.0.1

RFC 3021 /31 link: both .2 and .3 are usable — no address is reserved for broadcast.

Frequently Asked Questions – IP Subnet Calculator

They express the same information differently. A /24 prefix means the first 24 bits are network, which equals the dotted mask 255.255.255.0. The prefix is shorter to write; the mask is what legacy devices often require in their configuration.