Skip to content

Subnet calculator

IPv4 subnet calculator

Get the network and broadcast address, usable host range, subnet mask and wildcard for any IPv4 subnet, with a bit-by-bit binary breakdown. Built for network engineers, sysadmins and CCNA students.

Try

Calculated 192.168.0.0/24: 254 usable hosts, 192.168.0.1 to 192.168.0.254.

Results

192.168.0.0/24

254 usable hosts, 192.168.0.1 to 192.168.0.254

Network address
192.168.0.0/24
Identifies the subnet
Broadcast address
192.168.0.255
Reaches every host on the subnet
First host
192.168.0.1
Start of the usable range
Last host
192.168.0.254
End of the usable range
Usable hosts
254
256 total addresses
Subnet mask
255.255.255.0
/24 prefix
Wildcard mask
0.0.0.255
Inverse mask for ACLs and OSPF
IP class
Class CPrivate
RFC 1918 private range

Binary breakdown

Network bits (24) Host bits (8)
Each address and mask in dotted decimal and 32-bit binary. The first 24 bits are the network portion.
FieldDotted decimalBinary
Address192.168.0.111000000.10101000.00000000.00000001
Netmask255.255.255.0 = /2411111111.11111111.11111111.00000000
Wildcard0.0.0.25500000000.00000000.00000000.11111111
Network192.168.0.0/2411000000.10101000.00000000.00000000
Broadcast192.168.0.25511000000.10101000.00000000.11111111
First host192.168.0.111000000.10101000.00000000.00000001
Last host192.168.0.25411000000.10101000.00000000.11111110

Quick start

How to use this calculator

  1. 1

    Enter an IPv4 address

    Any valid address works, public (like 8.8.8.8) or private (like 192.168.1.10). You can also paste a block such as 10.0.0.0/8.

  2. 2

    Pick a prefix

    The dropdown shows both slash notation (/24) and the full dotted-decimal mask (255.255.255.0).

  3. 3

    Read the breakdown

    Click Calculate to see the network and broadcast address, wildcard mask, usable host range and full 32-bit binary breakdowns.

The basics

What is subnetting and why does it matter?

Subnetting is the process of partitioning a single IP network into two or more smaller, logical sub-networks. Every device connected to the internet sits inside a subnet, and understanding subnets is a core networking skill for the Cisco CCNA, CompTIA Network+ and AWS Solutions Architect certifications.

When an organisation receives an IP address block from a Regional Internet Registry (such as APNIC, ARIN or RIPE), it uses subnetting to divide that block into departments, offices or services. A company with a /16 network (65,534 usable hosts) might split it into 256 separate /24 subnets, one for each floor, branch or VLAN.

This calculator does the same maths as ipcalc and sipcalc on Linux, but entirely in your browser: no server calls, no API usage, and no data leaves your machine. Enter any valid IPv4 address and a CIDR prefix to see the full breakdown, or read our guide on what a subnet mask is.

Notation

Understanding CIDR notation

Usable hosts

2(32 − prefix) − 2

The minus 2 accounts for the network and broadcast addresses.

CIDR (Classless Inter-Domain Routing) replaced the legacy classful addressing system in 1993 via RFC 1519. Instead of rigid Class A (/8), Class B (/16) and Class C (/24) boundaries, CIDR lets a network boundary sit at any bit position from /1 to /32.

The notation 192.168.1.0/24 means the first 24 bits identify the network and the remaining 8 bits identify individual hosts. The number of usable hosts is 2(32 − prefix) − 2, because the first and last addresses are reserved.

In the binary breakdown above, highlighted bits are the locked network portion and grey bits are the variable host portion.

RFC 1918

Private vs public IP ranges

The calculator automatically flags addresses that fall inside the three private (RFC 1918) ranges.

Class A private

10.0.0.0/8

16,777,214 usable hosts

Class B private

172.16.0.0/12

1,048,574 usable hosts

Class C private

192.168.0.0/16

65,534 usable hosts

To check who owns a public IP, use our IP Lookup tool. You can also browse Popular IPs to see the addresses behind Google, Cloudflare and other major providers.

FAQ

Subnetting questions

Can't find what you need? Get in touch.

What is a wildcard mask?

A wildcard mask is the inverse of a subnet mask, used mainly in Cisco ACLs and OSPF configurations. Where the subnet mask has a 1, the wildcard has a 0, and vice versa. For example, the wildcard for 255.255.255.0 is 0.0.0.255.

Why are there 2 fewer usable hosts than total addresses?

The first IP is the network address (it identifies the subnet) and the last IP is the broadcast address (it sends data to all hosts). Neither can be assigned to a device.

What is a /31 or /32 subnet used for?

A /31 has exactly 2 addresses for point-to-point router links (RFC 3021). A /32 represents a single host address, commonly used in routing tables and loopback interfaces.

What is the difference between a subnet mask and a CIDR prefix?

They describe the same thing in two ways. A CIDR prefix such as /24 counts the leading 1-bits in the mask, while the subnet mask 255.255.255.0 writes those same 32 bits as four decimal octets.

Can I share or bookmark a calculation?

Yes. The address bar updates with ?ip= and ?cidr= every time you calculate, so the link always reopens the same subnet, like this 10.0.0.0/8 example. You can also type a block such as 192.168.1.0/24 into the site search.