Calculate Your IPv4 Subnet

Free IPv4 subnet calculator for network engineers, system administrators, cloud architects, and IT professionals. Calculate network address, broadcast address, usable host ranges, subnet mask, and CIDR instantly.

IP Subnet Calculator

Instantly calculate network addresses, host ranges, and broadcast IPs.

IPv4
▣
Enter an IPv4 address or use CIDR notation, e.g. 192.168.1.10/24.
☷

How It Works

Every IPv4 address is paired with a subnet mask that splits it into a network portion and a host portion. CIDR notation (e.g., /24) is shorthand for that mask — the number after the slash tells you how many bits are reserved for the network.

A /24 reserves 24 bits for the network and leaves 8 bits for hosts, giving you 256 total addresses (254 usable, since the first is the network address and the last is the broadcast address). Move to a /25 and you cut that in half: 128 addresses, 126 usable — useful when you need to split one office LAN into two VLANs without wasting address space.

This calculator does that math for you: enter an IPv4 address and select a CIDR prefix, or enter IP/CIDR, and it returns the network address, broadcast address, usable host range, and total/usable host counts — for both classful and classless (VLSM) designs.

CIDRSubnet MaskTotal AddressesUsable Hosts
/30255.255.255.25242
/29255.255.255.24886
/28255.255.255.2401614
/27255.255.255.2243230
/26255.255.255.1926462
/25255.255.255.128128126
/24255.255.255.0256254

VLAN Segmentation

Splitting a flat /24 office network into separate VLANs for voice, data, and guest Wi-Fi while planning the required address, gateway and DHCP changes.

Cloud VPC Planning

Sizing subnets inside an AWS VPC or Azure VNet so each tier (public, private, database) has enough headroom without wasting an entire CIDR block.

ISP Handoff & Point-to-Point Links

Confirming a /30 or /31 link from your ISP has the right usable range before configuring a router interface.

Frequently Asked Questions

CIDR notation writes an IP address followed by a slash and a number (e.g., 192.168.1.0/24), where the number is how many bits of the 32-bit address are fixed as the network portion. The remaining bits identify hosts within that network.

For conventional subnets through /30, usable hosts = 2^(host bits) − 2. /31 point-to-point links use both addresses; /32 identifies one address. The “−2” accounts for the network address and the broadcast address, which can’t be assigned to a device. A /24 has 8 host bits, so 2^8 − 2 = 254 usable hosts.

They describe the same thing in two formats. 255.255.255.0 and /24 are equivalent — CIDR is just the bit-count shorthand for the dotted-decimal mask.

For conventional subnets through /30, the broadcast address is the last address in the subnet range — it’s calculated by setting every host bit to 1. If your tool or manual math shows something else, double-check that the CIDR you entered matches the actual mask configured on the interface.

Borrow 2 bits from the host portion to move from /24 to /26. That gives you four /26 subnets, each with 62 usable hosts, carved out of the original block.

This version is built for IPv4/CIDR and VLSM. IPv6 uses a different addressing model (128-bit, no broadcast address) — worth a dedicated calculator if there’s demand.

Worked example: locate a host inside a /26

Enter 192.168.1.130/26. Six host bits give blocks of 64 addresses. The address belongs to 192.168.1.128–192.168.1.191; the network is .128, broadcast .191, and conventional host range .129–.190, with 62 usable addresses.

A /24 split into /26 blocks starts at .0, .64, .128 and .192. Changing the prefix does not automatically configure VLANs, routing, DHCP scopes or gateways. Check for overlapping allocations before deployment.

Special prefixes and platform reservations

A /31 is intended for compatible point-to-point links and uses both addresses without a directed broadcast. A /32 represents a single address. The calculator shows N/A for their broadcast field. Cloud platforms can reserve additional addresses, so their assignable count may be lower than this generic calculation.

Reference: RFC 3021 on /31 point-to-point links. Report a correction.