UnitConv
Network & Dev

IP Subnet Calculator

Calculate the network and broadcast address, host range, subnet mask and CIDR for any IPv4 address and prefix - right in your browser

Input

/24

Results

CIDR notation
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 (/24)
Wildcard mask
0.0.0.255
Total addresses
256
Usable hosts
254
IP class
Class C
Scope
Private

Binary view

Network bitsHost bits

IPv4 address

11000000
.
10101000
.
00000001
.
00001010

Network address

11000000
.
10101000
.
00000001
.
00000000

Subnet mask

11111111
.
11111111
.
11111111
.
00000000

All calculations run locally in your browser. No address is ever sent to a server.

About this tool

This IPv4 subnet calculator turns an IP address and a CIDR prefix into everything you need to plan or troubleshoot a network. Type an address such as 192.168.1.10 and drag the prefix slider (or paste a subnet mask like 255.255.255.0) and the tool instantly shows the network address, broadcast address, the first and last usable host, the total number of addresses and the number of usable hosts, the dotted-decimal subnet mask and its wildcard mask, the IP class (A-E) and whether the address is private or public. A color-coded binary view splits each octet into network bits and host bits so you can actually see how the mask divides the address. Special cases are handled correctly: a /31 gives two usable addresses per RFC 3021, a /32 describes a single host, and a /30 yields exactly two hosts. Everything is computed in your browser with exact unsigned 32-bit arithmetic - no data leaves your device.

How to use

  1. 1 Enter an IPv4 address such as 192.168.1.10.
  2. 2 Drag the CIDR prefix slider from /0 to /32, or paste a subnet mask to set it automatically.
  3. 3 Read the results table: network, broadcast, host range, masks, class and private/public.
  4. 4 Use the binary view to see the network/host split, and copy any value with one click.

How it works

An IPv4 address is a 32-bit number, written as four 8-bit octets. The CIDR prefix says how many leading bits identify the network; the rest identify the host. The subnet mask is those leading 1 bits, so for /24 it is 11111111.11111111.11111111.00000000 = 255.255.255.0. The network address is the IP bitwise-AND the mask; the broadcast address is the network ORed with the wildcard mask (the inverse of the mask). The total number of addresses in the block is 2^(32 - prefix), and the usable host count is that minus two (the network and broadcast addresses) for prefixes up to /30. A /31 is the special point-to-point case from RFC 3021 with two usable addresses and no broadcast, and a /32 is a single host. The tool performs every step with exact unsigned 32-bit math (using >>> 0 so results never go negative), which is why even a /8 block correctly reports 16,777,214 usable hosts.

Frequently asked questions

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; you do not assign it to a device. The broadcast address is the last address (all host bits 1) and is used to send to every host on the subnet at once. For a /24 like 192.168.1.0/24 the network is 192.168.1.0 and the broadcast is 192.168.1.255, leaving 192.168.1.1 to 192.168.1.254 for hosts.

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

In a normal subnet (/30 and larger blocks, i.e. prefix 30 or smaller) the first address is reserved as the network address and the last as the broadcast address, so neither can be assigned to a device. That is why a /24 has 256 total addresses but only 254 usable hosts. The exceptions are /31, which uses both addresses for a point-to-point link, and /32, which is a single host.

How does a subnet mask relate to the CIDR prefix?

They describe the same split in two notations. The prefix is the count of leading 1 bits in the mask: /24 means 24 ones, which is 255.255.255.0; /26 means 26 ones, which is 255.255.255.192. You can enter either one here - typing a valid mask sets the prefix slider, and moving the slider updates the mask.

How can I tell if an IP address is private?

Private (RFC 1918) ranges are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16; these are used inside home and corporate networks and are not routable on the public internet. This tool also flags loopback (127.0.0.0/8), link-local (169.254.0.0/16) and carrier-grade NAT (100.64.0.0/10) as non-public. Any other address is treated as public.

What are IP address classes A through E?

Classes are the historical scheme based on the first octet: Class A (0-127) used an 8-bit network part, Class B (128-191) 16 bits, and Class C (192-223) 24 bits. Class D (224-239) is multicast and Class E (240-255) is reserved. Modern networks use classless CIDR instead, but the class is still shown here because it appears in older documentation and exams.

Related tools and uses

Pair the subnet calculator with the number-base converter to see addresses in binary and hex, the bitwise calculator to experiment with AND/OR masks, and the IP-friendly hash and UUID generators for tokens. Network engineers and students use it to plan address space, size VLSM subnets, verify firewall rules and answer CCNA-style subnetting questions.