Skip to main content

Web Tools

IP/Subnet Calculator

Calculate IPv4 network, broadcast, and host range. Free online tool — no sign-up required.

See how to use this tool

IP/Subnet Calculator

Calculate IPv4 network, broadcast, and usable host range.

IP address192.168.1.42
Prefix24
Subnet mask255.255.255.0
Network192.168.1.0
Broadcast192.168.1.255
First host192.168.1.1
Last host192.168.1.254
Total addresses256
Usable hosts254

Plain text result

IP address: 192.168.1.42
Prefix: 24
Subnet mask: 255.255.255.0
Network: 192.168.1.0
Broadcast: 192.168.1.255
First host: 192.168.1.1
Last host: 192.168.1.254
Total addresses: 256
Usable hosts: 254

Privacy: this tool processes input locally in your browser without server upload.

About IP/Subnet Calculator

ToolConv's IP subnet calculator takes a CIDR notation like 192.168.1.0/24 or an IPv6 block like 2001:db8::/32 and computes the full subnet geometry: network address, broadcast address (for IPv4), usable host range, total host count, wildcard mask, and the binary representation of each octet. It handles both IPv4 and IPv6, including the edge cases that trip up manual math — /31 point-to-point links (RFC 3021), /32 host routes, and the IPv6 all-zeros host identifier.

All computation runs locally in your browser — no IP address or network topology is transmitted. The calculator also performs the inverse operation: given a required host count, it suggests the smallest CIDR prefix that fits (e.g. 60 hosts fits in a /25 with 126 usable), and splits a /24 into four equal /26 subnets on request. It is useful for firewall rules, cloud security groups, DHCP scope planning, and confirming that two IPs are in the same subnet without doing binary arithmetic by hand.

How to use it

  1. 1Enter a CIDR block (e.g. 10.0.0.0/24) or an IPv6 prefix (e.g. 2001:db8::/64).
  2. 2The calculator computes network address, broadcast, host range, and count locally.
  3. 3Review the wildcard mask and per-octet binary breakdown.
  4. 4Use the inverse mode: enter a host count to get the smallest fitting prefix.
  5. 5Optionally request a subnet split to divide a block into equal-sized pieces.

When to use it

  • ✓Planning a VPC subnet layout in AWS/Azure without exceeding the /28 minimum.
  • ✓Confirming two IPs (10.0.1.5 and 10.0.1.200) are in the same /24 subnet.
  • ✓Designing a firewall rule for a /29 point-to-point link between two routers.
  • ✓Sizing a DHCP scope for 120 devices and confirming it fits in a /25.

Features

  • •Full CIDR math for both IPv4 and IPv6, including /31 (RFC 3021) and /32 edge cases.
  • •Reports network address, broadcast, usable host range, total host count, wildcard mask.
  • •Inverse sizing: enter a host count, get the smallest fitting CIDR prefix.
  • •Subnet split: divide a block into N equal-sized smaller subnets.
  • •100% local — no IP addresses or network topology leave your browser.

Related tools

FAQ

How many usable hosts are in a /24?

A /24 has 256 total addresses, but the first (network address, .0) and last (broadcast, .255) are reserved, leaving 254 usable hosts. In general, an IPv4 /n prefix has 2^(32-n) total addresses and 2^(32-n) - 2 usable hosts, except for /31 (RFC 3021, 2 usable, no broadcast) and /32 (1 address, a host route).

What is the difference between /24 and 255.255.255.0?

They are two notations for the same mask. 255.255.255.0 is dotted-decimal; /24 is CIDR notation, where 24 is the number of leading 1-bits in the mask. The calculator shows both forms and the wildcard mask (0.0.0.255, the bitwise inverse) used in Cisco ACLs.

How does IPv6 subnetting differ from IPv4?

IPv6 has no broadcast address, so every address in a subnet is usable — a /64 has 2^64 addresses, all usable. The common convention is a /48 site prefix divided into /64 LAN subnets (16 bits of subnet ID). The calculator handles IPv6 directly and reports the expanded address and prefix boundary.

Are my IP addresses sent anywhere?

No. All subnet math is performed locally in your browser's JavaScript. No IP address, CIDR block, or network topology is transmitted — you can use it offline for internal, RFC 1918, or sensitive production ranges without concern.

What is a /31 link and why does it have 2 usable hosts?

Per RFC 3021, a /31 uses all 2 addresses for point-to-point router links instead of reserving a network and broadcast address. This halves the address consumption of inter-router links, which matters in tight addressing plans. The calculator recognizes /31 and reports both addresses as usable with no broadcast.

How do I find the smallest subnet for N hosts?

Use the inverse-sizing mode: enter N (e.g. 60) and the calculator finds the smallest prefix whose usable host count fits. For IPv4, 60 hosts needs a /25 (126 usable). The formula is to find the smallest k such that 2^k - 2 >= N, then the prefix length is 32 - k.