IPv4 Subnet Calculator

Netmask and prefix会自动同步

Network: 192.168.1.0

Broadcast: 192.168.1.255

First Host: 192.168.1.1

Last Host: 192.168.1.254

Prefix: /24

Netmask: 255.255.255.0

Total addresses: 256

Usable hosts: 254

About This Tool

The IPv4 Subnet Calculator is an essential tool for network engineers, system administrators, and IT professionals working with IPv4 networks. It automatically calculates network parameters including network address, broadcast address, host ranges, and the number of available hosts. The tool supports both CIDR notation and traditional subnet mask formats, making it versatile for different networking scenarios.

How to Use

  1. Enter an IPv4 address (e.g., 192.168.1.10) in the IPv4 Address field
  2. Specify the prefix length (0-32) OR enter a subnet mask directly
  3. The prefix and netmask fields automatically sync with each other
  4. View calculated network information including network address, broadcast address, host ranges, and address counts

Features

  • Bidirectional conversion between CIDR prefix and subnet mask
  • Real-time calculation as you type
  • Automatic synchronization between prefix and netmask fields
  • Display of network address, broadcast address, and usable host range
  • Total and usable host count with thousand separators
  • Support for all prefix lengths from /0 to /32
  • Special handling for /31 (point-to-point) and /32 (host) networks

Common Use Cases

  • Designing and planning IP address schemes for networks
  • Calculating the number of hosts available in a subnet
  • Determining network and broadcast addresses
  • Converting between CIDR notation and subnet masks
  • Verifying subnet configurations
  • Learning IPv4 subnetting concepts
  • Troubleshooting network connectivity issues

Technical Details

IPv4 addresses are 32-bit numbers divided into network and host portions. The prefix length (CIDR notation) indicates how many bits are used for the network portion.

Common subnet masks and their equivalents:

  • /24 = 255.255.255.0 (254 usable hosts)
  • /25 = 255.255.255.128 (126 usable hosts)
  • /26 = 255.255.255.192 (62 usable hosts)
  • /27 = 255.255.255.224 (30 usable hosts)
  • /28 = 255.255.255.240 (14 usable hosts)
  • /30 = 255.255.255.252 (2 usable hosts, common for point-to-point links)

The calculator automatically accounts for reserved addresses (network and broadcast) except for /31 networks which are used for point-to-point links.