Skip to main content
IPAddressLookup.in

IPv4 Subnet Calculator

Calculate IPv4 CIDR network address, directed broadcast address, dotted-decimal and hexadecimal subnet mask, ACL wildcard mask, total address count, and usable host range for any prefix from /0 to /32.

Mask: 255.255.255.0
Common prefixes:

CIDR classless prefix /24 (24 network bits, 8 host bits) · Private-Use Network (Home & Small Office LAN)

192.168.1.0/24

Network Address

192.168.1.0

Broadcast Address

192.168.1.255

Usable Host Range

192.168.1.1 – 192.168.1.254

Subnet Mask (Dotted-Decimal & Hex)
255.255.255.0 (0xFFFFFF00)
Wildcard Mask (ACL / OSPF Inverse)
0.0.0.255
Total IPv4 Addresses in Block
256
Usable Host Addresses
254
Binary Subnet Mask
11111111.11111111.11111111.00000000
32-Bit Network Prefix vs. Host Bit BoundaryBlue: 24 Network Bits · Slate: 8 Host Bits
11000000.10101000.00000001.00000000

How Classless Inter-Domain Routing (CIDR) Subnetting Works

Classless Inter-Domain Routing (CIDR, RFC 4632) replaced rigid Class A, B, and C boundaries with a variable-length prefix suffix written as /N (where N is the number of leading 1 bits in the 32-bit subnet mask). The remaining 32 − N trailing bits identify individual host interfaces inside that subnet:

  • Network Address: Computed via bitwise AND between the IPv4 address and the subnet mask (all host bits set to 0).
  • Broadcast Address: Computed by setting all 32 − N host bits to 1.
  • Usable Host Range: For prefixes /0 through /30, usable hosts equal 2^(32−N) − 2 because the network and directed broadcast addresses are reserved.

Special Prefixes: /31 and /32

Conventional formulas yield zero usable hosts for /31 and /32, which is why our calculator handles them explicitly:

  • RFC 3021 (/31 Point-to-Point Links): Used between two router interfaces where broadcast isn't needed; both addresses in the 2-address block are usable.
  • Host Route (/32): Refers to a single specific IPv4 loopback or host interface (1 usable address). Need to convert an arbitrary IP range into CIDRs? Use our IP Range to CIDR Calculator.

Technical Specifications & Protocol Facts

Authoritative parameters, dimensions, and IETF RFC compliance

Parameter / DimensionTechnical SpecificationStandard / Authority
Supported CIDR Prefix Range/0 (0.0.0.0) through /32 (255.255.255.255)RFC 4632 CIDR
Point-to-Point Link Support/31 subnet provides 2 usable hosts with no broadcast overheadRFC 3021
Host Route Handling/32 single-host route provides 1 usable addressRFC 4632
Computation Engine100% deterministic 32-bit BigInt bitwise math (zero external API delay)IEEE / IETF Bitwise

Frequently Asked Questions

Concise answers verified against IANA, APNIC, and IETF protocol standards

How is the number of usable hosts calculated for a standard IPv4 subnet?

For prefixes from /0 to /30, total addresses equal 2^(32 - prefix), and usable hosts equal 2^(32 - prefix) - 2 because the first address is reserved as the network identifier and the last as the directed broadcast address.

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

RFC 3021 defines /31 prefixes specifically for point-to-point router links where broadcast is unnecessary, allowing both addresses in the 2-address block to be assigned to interfaces.

What is the difference between a subnet mask and a wildcard mask?

A subnet mask uses 1-bits to mark the network prefix (e.g., 255.255.255.0 for /24), whereas a wildcard mask is the bitwise inverse (0.0.0.255) used in router ACLs and OSPF configurations.

Contextual utilities and reference documentation verified for this workflow

Subnet Calculator · Canonical: https://ipaddresslookup.in/subnet-calculator · Reviewed: 2026-11-01

Reviewer: IPAddressLookup.in Technical Network Utility Group · Stateless Privacy · Accuracy & Data Limits