Development·design 176

IPv4 subnet calculator

Check network, mask, address range, and host count using IPv4 address and CIDR prefix.

Input

The example value has been entered. Check it immediately or change the value.

Integer · minimum 0 · maximum 32

Run with Ctrl or ⌘ + Enter

Input is processed in the browser. Refreshing returns a sample value.

Result

Check or change the value using the example value result.

/0~30 shows the number of hosts excluding network and broadcast addresses. /31 treats both addresses as hosts according to RFC 3021 point-to-point link. /32 treats one host path. Private, reserved, or special uses of addresses are not categorized, and device behavior is not determined.

Share result

Share the tool link and result text together. No URL is included in the result. Check the below content and then share it.

Calculation·conversion criteria

Enter IPv4 address and CIDR prefix to check the network, range, mask, and host count.

Mask = 32 bits with a prefix length equal to 1 from the left; Network = address AND mask; Last address = network OR wildcard mask

Input example

192.168.1.37/24 → network 192.168.1.0 · mask 255.255.255.0 · 254 hosts

192.168.1.37/24 places the last 8 bits in the host range. Thus, the network is 192.168.1.0, subnet mask is 255.255.255.0, address range is 192.168.1.0–192.168.1.255, and the host range is .1–.254 with 254 hosts.

How to use

  1. Use the provided example value or replace the IPv4 address or CIDR prefix length (/0~32) field.
  2. Click Verify result and check the following result.
  3. Result can be copied if needed.

Frequently Asked Questions

/24 prefix means what?

The first 24 bits of IPv4 32-bit address represent the network prefix. The remaining 8 bits indicate 254 hosts after removing network and broadcast addresses.

/31 and /32 how are host counts calculated?

/31 assumes a point-to-point link per RFC 3021, treating both addresses as hosts. /32 uses a single IPv4 host path for one address. Check the device documentation for network device settings.

Do you want to know if it’s a private IP or a public IP?

This calculator only calculates the CIDR range of the entered value. It does not determine whether a address is private, reserved, or for special use, or whether it can be assigned to a real network.

Calculation criteria and reference materials

Verification of calculation criteria: · Calculation·verification principles · Report errors