IPv4 Subnet Calculator

Calculate network address, broadcast address, usable IP range, CIDR prefix, and total host capacity with support for /31 point-to-point links.

IPv4 Subnet Calculator

Best solution

Network diagnostic: IPv4 Subnet Calculator; Network Address, Broadcast IP & Netmask.

192.168.1.0/24
Mask
255.255.255.0
Range
192.168.1.1 – 192.168.1.254
Broadcast
192.168.1.255
Addresses
256 total · 254 usable

/31 uses the point-to-point convention; /32 is one host. No network scan is performed.

Kepo
Kepo · Desktop Widgets

Keep fast calculators and daily tools pinned right to your desktop.

Install Desktop Widget

Methodology & calculation rule

Bitwise AND operations: Network = IP & Mask; Broadcast = IP | (~Mask); Usable Hosts = 2^(32 - Prefix) - 2 (RFC 3021 /31 yields 2 usable hosts).

Network observations execute bounded requests to public measurement backends (ipify, Google Public DNS, Globalping, or Cloudflare). Measurements distinguish local client configuration from external internet reachability.

No browsing history, private tokens, or credentials are captured. Results are snapshots of external probe vantage points at the recorded observation timestamp.

Real-World Context & Technical Standards

Classless Addressing

Classless Inter-Domain Routing (CIDR)

RFC 1519 replaced obsolete Class A, B, and C networks with CIDR prefix notation (/0 through /32), allowing variable-length subnet masking (VLSM) to conserve IPv4 address space.

Host Allocation Formula

Usable Hosts = $2^{(32 - \text{prefix})} - 2$

For prefixes /0 through /30, the first address is reserved as the Network Identifier and the final address serves as the Directed Broadcast, leaving the intervening range for assignable host nodes.

RFC 3021 Point-to-Point

31-Bit Prefixes on Router Links

RFC 3021 permits /31 subnets on point-to-point router links without reserving separate network or broadcast addresses, perfectly allocating exactly two endpoint IP addresses with zero waste.

Related network tools and diagnostics
ToolMetricScope
What Is My IP Address? Diagnosticwhat is my ip address
IP Address Lookup Diagnosticip address lookup
Remote Ping Test Diagnosticping test
DNS Lookup Diagnosticdns lookup
Is It Down? Diagnosticis it down

Frequently Asked Questions

What is CIDR prefix notation?

Classless Inter-Domain Routing (CIDR) denotes the number of continuous high-order 1-bits in a subnet mask. For instance, /24 corresponds to 255.255.255.0 and leaves 8 host bits (256 addresses).

Why are two addresses subtracted from the total in /24 subnets?

The first address (host portion all 0s) is reserved as the network identifier, and the final address (host portion all 1s) is reserved as the directed broadcast address.

Why does a /31 subnet have 2 usable hosts instead of 0?

RFC 3021 defines 31-bit prefixes specifically for point-to-point router interconnects, eliminating directed broadcast and network reservations to conserve scarce IPv4 address space.