Skip to content
1001 Tools
sr
Developer tools

IP Subnet Calculator

Enter an IPv4 address and pick a prefix (or paste a full CIDR like 192.168.1.0/24) to see the network and broadcast addresses, the usable host range, the subnet and wildcard masks, and how many hosts the block holds. It handles the edge cases — /31 point-to-point links and single-host /32 — correctly. Everything runs in your browser.

CIDR
192.168.1.0/24
Network address
192.168.1.0
Broadcast address
192.168.1.255
Usable host range
192.168.1.1 – 192.168.1.254
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Usable hosts
254
Total addresses
256
Type
Private (RFC 1918)

IPv4 only. All arithmetic runs locally in your browser — nothing is uploaded.

How it works

The prefix says how many leading bits are the network part. The subnet mask is those bits set to 1 (a /24 is 255.255.255.0); ANDing the address with the mask gives the network address, and setting the host bits to 1 gives the broadcast. The wildcard mask is the mask inverted — the form access lists and some routers use.

A block of prefix n holds 2^(32−n) addresses. Normally the first (network) and last (broadcast) are reserved, so usable hosts are that total minus two — a /24 has 256 addresses and 254 usable. Two special cases follow their RFCs: a /31 has 2 usable addresses for point-to-point links (RFC 3021), and a /32 is a single host. The tool also flags whether the address is private (RFC 1918) or public.

Practical examples

A home network — 192.168.1.10/24

Network 192.168.1.0, broadcast 192.168.1.255, usable range .1–.254, 254 hosts, mask 255.255.255.0. This is the default for most home routers, and it is a private range.

Splitting into quarters — /26

A /26 mask is 255.255.255.192 with 62 usable hosts. 192.168.1.200/26 lands in the block 192.168.1.192 – .255, so its network is 192.168.1.192.

A router-to-router link — /30 or /31

A /30 gives 4 addresses and 2 usable — the classic point-to-point setup. A /31 (RFC 3021) squeezes the same link into 2 addresses with no waste; the tool reports both hosts as usable.

Frequently asked questions

What does the /24 in an IP address mean?

It is the CIDR prefix — the number of bits that identify the network. /24 means the first 24 bits (the first three octets) are the network, leaving 8 bits for hosts, which is 256 addresses and a 255.255.255.0 mask.

What is the difference between the network and broadcast address?

The network address is the first address in the block (all host bits 0) and names the subnet itself. The broadcast address is the last (all host bits 1) and reaches every host at once. Neither is assigned to a device, which is why they are excluded from the usable count.

How many usable hosts does a subnet have?

For most prefixes it is 2^(32−prefix) − 2, because the network and broadcast addresses are reserved. A /24 has 254, a /25 has 126, a /26 has 62. A /31 has 2 (point-to-point) and a /32 has 1.

What is a subnet mask?

It is the prefix written as a dotted-quad, with network bits set to 1. /24 is 255.255.255.0, /26 is 255.255.255.192. ANDing an address with the mask yields its network address, which is how a device decides whether a destination is local or must go through the gateway.

What is the wildcard mask for?

It is the subnet mask inverted (0s where the mask has 1s). Cisco access control lists and some routing tools take the wildcard form instead of the mask, so a /24 is written with wildcard 0.0.0.255.

Can I paste a full CIDR instead of setting the prefix?

Yes. Type something like 10.0.0.0/16 into the address field and the tool splits off the /16 and sets the prefix selector for you. Or set the prefix separately with the dropdown.

Which addresses are private?

The RFC 1918 ranges: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. These are not routed on the public internet and are used inside home and office networks. The tool labels each address as private or public.

Does it support IPv6?

Not yet — this tool covers IPv4 only, which is where subnet questions usually come up. IPv6 uses the same prefix idea but 128-bit addresses and different conventions.

Is my input sent anywhere?

No. The calculation is bit arithmetic done entirely in your browser; the address you enter is never uploaded and analytics never receives it.

Related tools