Subnet Calculator

IPv4 CIDR subnet solver — network, broadcast, mask, wildcard, host range and usable hosts.

Reviewed by the WorldCalcs team · Methodology · Last reviewed: July 2026

IP address

CIDR

192.168.1.10/24

Network address
192.168.1.0
Broadcast address
192.168.1.255
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
First usable host
192.168.1.1
Last usable host
192.168.1.254
Usable hosts
254
Total addresses
256

What is a subnet calculator?

A subnet calculator works out the network details for an IPv4 address and a CIDR prefix (the "/24" style number). From just an IP and a prefix it gives you the network address, the broadcast address, the subnet mask, the usable host range and how many devices the subnet can hold. It saves you doing the binary maths by hand.

How subnetting works

The prefix tells you how many bits at the start of the address are fixed for the network. A /24 fixes the first 24 bits, leaving 8 bits for hosts. The subnet mask is those fixed bits written in dotted form (255.255.255.0 for a /24), and the wildcard mask is its inverse (0.0.0.255).

  • Network address = IP AND subnet mask (all host bits set to 0)
  • Broadcast address = network address with all host bits set to 1
  • Total addresses = 2 raised to the number of host bits
  • Usable hosts = total − 2 (the network and broadcast addresses are reserved)

Worked example

For 192.168.1.10/24 the mask is 255.255.255.0. The network address is 192.168.1.0 and the broadcast is 192.168.1.255. Usable hosts run from 192.168.1.1 to 192.168.1.254 — that is 254 addresses (256 total, minus network and broadcast).

Special cases: /31 and /32

Two prefixes break the "minus two" rule. A /31 has just two addresses and, under RFC 3021, both are usable on point-to-point links, so usable = 2. A /32 is a single host address (often used for one machine or a loopback), so usable = 1.

Pair this with our Number Base Converter, Random Number Generator and Password Generator, or browse all everyday calculators.

All calculations happen in your browser. Nothing is sent, stored, or tracked.

Results are estimates and may contain errors — for general information only, not professional advice. Always verify before relying on them. Disclaimer

How to use

Enter the four octets of an IPv4 address and choose a CIDR prefix (/0 to /32). The tool computes the network address, broadcast, subnet mask, wildcard mask, first and last usable host, and totals.

Special cases: /31 gives 2 usable hosts (RFC 3021 point-to-point), and /32 is a single host.

Frequently asked questions

What is a subnet mask?+

It marks which part of an IP address is the network and which part is the host. For a /24 the mask is 255.255.255.0 — the first three groups are the network.

What does /24 mean in CIDR?+

The /24 means the first 24 bits of the address are the network portion, leaving 8 bits (256 addresses) for hosts on that subnet.

How many usable hosts are in a /24?+

254. A /24 holds 256 addresses in total, and two are reserved (the network address and the broadcast address).

Why is the usable host count two less than the total?+

The first address in a subnet is the network address and the last is the broadcast address. Neither is assigned to a device, so you subtract two.

What is a /31 subnet used for?+

Point-to-point links between two routers. RFC 3021 lets both addresses be used, giving exactly two usable hosts with no wasted broadcast address.

What is the difference between a subnet mask and a wildcard mask?+

They are inverses. The subnet mask marks network bits (255.255.255.0); the wildcard mask marks host bits (0.0.0.255) and is common in access-control lists.

What is a broadcast address?+

The last address in a subnet, with every host bit set to 1. Traffic sent to it reaches all hosts on that subnet, so it is not assigned to a single device.

How do I work out the number of hosts for any prefix?+

Total addresses = 2^(32 − prefix). For usable hosts subtract 2 (for prefixes /30 and larger networks); /31 gives 2 and /32 gives 1.