IPv4 Subnet Calculator

Free online IPv4 subnet calculator. Enter a CIDR to get the network and broadcast address, subnet mask, wildcard, usable host count and address class. Runs 100% in your browser.

Runs locally · data never uploaded
Advertisement

How to use

What it does

An IPv4 address is 32 bits long, and subnetting uses a CIDR prefix (e.g. /24) to mark how many bits belong to the network. Given an "IP + prefix", this tool derives the network address, broadcast address, subnet mask, wildcard mask, usable host count, the first and last usable addresses, the binary form, the address class (A/B/C/D/E) and whether the range is private.

Besides IPv4 math, it labels the address class and flags private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 and similar). Everything is computed locally in your browser — nothing is uploaded.

Example

Enter 192.168.1.0/24 (or just the IP and pick prefix 24 from the dropdown):

Network address:  192.168.1.0
Broadcast address: 192.168.1.255
Subnet mask:      255.255.255.0
Usable hosts:     254
First usable:     192.168.1.1
Last usable:      192.168.1.254
Address class:    C
Private range:    Yes

A /31 prefix yields 2 usable hosts (point-to-point links) and a /32 is a single-host route with 1 usable host.

FAQ

Q1.What is the difference between network and broadcast addresses?
The network address is the lowest address in a subnet (host bits all 0) and identifies the network itself. The broadcast address is the highest (host bits all 1) and reaches every host on the subnet. Neither can be assigned to a host.
Q2.Why are there 2 fewer usable hosts than total addresses?
Each subnet reserves the network and broadcast addresses, so usable hosts = 2^(32-prefix) - 2. Exceptions: a /31 keeps 2 addresses for point-to-point links, and a /32 is a single-host route with 1 address.
Q3.How do I tell whether an address is private?
RFC 1918 defines 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 as private ranges that are not routable on the public internet. This tool marks the "Private range" field automatically.
Q4.Are address classes A/B/C still relevant?
Classes are an older scheme largely replaced by CIDR, but many references still mention them. The tool keeps the field for context; real subnetting is driven by the CIDR prefix.
Advertisement

Related tools