IP Subnet Calculator (IPv4 CIDR)

Calculate network address, mask, broadcast, first and last host and number of hosts from an IPv4 address and CIDR prefix. Enter your values; the result updates as you type, with the method shown below.

About this calculator

This IPv4 subnet calculator takes an address and a CIDR prefix and gives the network address, the subnet mask, the broadcast address, the first and last usable hosts and the number of hosts.

Enter an IPv4 address such as 192.168.1.10 and a prefix from 0 to 32.

When to use it

  • Planning a home or office network.
  • Network certification study.
  • Configuring routers and firewalls.
  • Troubleshooting IP conflicts.

How to read the result

192.168.1.10/24 is in network 192.168.1.0, mask 255.255.255.0, broadcast 192.168.1.255, with 254 usable hosts.

Usable hosts = 2^(32 − prefix) − 2, except for /31 and /32.

Mistakes to avoid

  • Using the network or broadcast address for a device.
  • Confusing /24 with 24 hosts.
  • Mixing IPv4 and IPv6.

Formula

Network = IP AND mask; broadcast = network OR NOT mask

Worked example

192.168.1.10/24: network 192.168.1.0, broadcast 192.168.1.255, 254 hosts.

Frequently asked questions

What is CIDR?

The /n prefix gives the number of network bits.

Why 2 addresses fewer?

The network and broadcast addresses cannot be used by hosts.

What does /24 mean?

The first 24 bits identify the network.

How many hosts in a /26?

62.

Does it handle IPv6?

No, IPv4 only.

Related calculators

Results are estimates for information only. Check important figures with a professional.