KitJade
Network & CybersecurityRuns in your browser

IPv4 Subnet Calculator

Network, broadcast, host range and binary working for IPv4.

Use the IPv4 Subnet Calculator tool

Runs in your browserUpdated Report a problem

What this ipv4 subnet calculator does

IPv4 Subnet Calculator takes an address and a prefix length such as 192.168.1.10/24 and returns everything you need to configure or troubleshoot a subnet: the network address, broadcast address, first and last usable host, total address count, netmask, wildcard mask and the binary representation of the mask.

It also explains the arithmetic, so you can check the result by hand. The calculator understands the special cases that trip people up: /31 point-to-point links (RFC 3021), /32 host routes, and the historical classful classification of the address.

Why use it

  • Configure a router interface or firewall rule with the correct network and mask.
  • Confirm whether two addresses are in the same subnet before blaming routing.
  • Teach or verify subnetting arithmetic with the binary view.

How to use it

  1. 1Enter an IPv4 address — either a bare address or CIDR notation.
  2. 2Enter a prefix length from 0 to 32, or choose a common prefix.
  3. 3Read the network, broadcast and usable range cards.
  4. 4Copy the subnet details for your ticket or configuration.

Worked examples

Typical /24 LAN

Input

192.168.1.10/24

Output

Network 192.168.1.0 · Broadcast 192.168.1.255 · Hosts 192.168.1.1 – 192.168.1.254 · 254 usable · Mask 255.255.255.0

A /20 is not a /24

Input

10.0.0.0/20

Output

Network 10.0.0.0 · Broadcast 10.0.15.255 · Hosts 10.0.0.1 – 10.0.15.254 · 4,094 usable · Mask 255.255.240.0

A /20 spans 16 /24 blocks, which is why the third octet changes in the usable range.

Common mistakes

  • Assigning the network or broadcast address to a host — both are reserved (except on /31 and /32).
  • Assuming every private range is /24. A /16 private network has 65,534 usable addresses.
  • Forgetting that the first and last addresses are unusable, so a /24 provides 254 hosts, not 256.

Frequently asked questions

How many usable hosts does a subnet have?
For prefixes /1 to /30, usable hosts are 2^(32-prefix) − 2. A /31 has 2 usable addresses on point-to-point links under RFC 3021, and a /32 is a single host route.
What is a wildcard mask?
It is the bitwise inverse of the subnet mask, used by ACLs and OSPF. For 255.255.255.0 the wildcard mask is 0.0.0.255.
Are private addresses included?
Yes. The calculator labels RFC 1918 ranges (10/8, 172.16/12, 192.168/16), loopback, link-local, CGNAT and documentation ranges.
Does this tool contact my network?
No. Subnet arithmetic is pure calculation in your browser.
All tools