Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)
IP Subnet Calculator

IP Subnet Calculator

Calculate the network address, broadcast address, usable host range, and CIDR notation for IPv4 and IPv6 networks, with a binary breakdown and CIDR table.

IP Subnet Calculator for IPv4 and IPv6

This subnet calculator turns an IP address and a CIDR prefix or subnet mask into the full network picture — network address, broadcast address, usable host range, host counts, and the masks behind them. It is built for network engineers, sysadmins, and students who need the subnet math done correctly and instantly.

Enter an IPv4 address and pick a prefix to see results update as you type, switch to the IPv6 tab for prefix-length calculations, or open the CIDR Reference tab to look up any prefix from /0 to /32. A binary breakdown shows exactly which bits belong to the network and which belong to the host.

Private by design: every calculation runs entirely in your browser with JavaScript. No IP addresses or network details are ever uploaded to a server.

How to Use the Subnet Calculator

1

Enter an IPv4 address

Type an address such as 192.168.1.0 into the IPv4 field. Each octet is validated, so only a valid address produces results.

2

Choose a CIDR prefix or subnet mask

Pick a CIDR prefix like /24 or select a Subnet Mask — the two dropdowns stay in sync, so changing one updates the other automatically. Results appear instantly, with no calculate button to press.

3

Open the binary breakdown

Expand Binary Breakdown to see all 32 bits, with network bits in purple and host bits in green, plus the binary form of the network, broadcast, and mask addresses.

4

Switch to IPv6 or the CIDR table

Use the IPv6 tab for prefix-length math (presets for /48, /56, /64, /128), or the CIDR Reference tab to search every prefix and click a row to apply it back to the IPv4 calculator.

Features

Real-Time Calculation

Every result updates instantly as you type or change a setting, so you can explore subnet configurations without clicking calculate.

Network & Broadcast Address

Pinpoints the first address that identifies the subnet and the last address used to reach every host in it.

Usable Host Range & Counts

Shows the first and last assignable host plus total and usable host counts, with correct handling of /31 and /32 edge cases.

Subnet & Wildcard Mask

Displays both the subnet mask used by operating systems and the inverse wildcard mask used in Cisco ACLs and OSPF.

IP Class & Type

Identifies the address class (A through E) and whether the address is private or public.

Binary Breakdown

Visualises all 32 bits with network bits in purple and host bits in green, alongside the binary network, broadcast, and mask addresses.

CIDR & Mask Sync

The CIDR prefix and subnet mask dropdowns stay linked, so you can work from whichever notation you prefer.

Full IPv6 Support

Calculates the full and compressed address, network range, prefix, and total addresses, with quick presets for /48, /56, /64, and /128.

CIDR Reference Table

Lists every prefix from /0 to /32 with mask, wildcard, total, and usable hosts — searchable and clickable to apply a row instantly.

Local & Private

All subnet math happens in your browser — nothing you enter is sent to a server.

Frequently Asked Questions

How many hosts are in a /24 subnet?

A /24 subnet has 256 total addresses and 254 usable hosts. Two addresses are reserved: the network address (all host bits 0) and the broadcast address (all host bits 1). Enter any address with a /24 prefix to confirm this and see the exact host range.

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation writes an address and its mask as a slash followed by the number of network bits. For example, 192.168.1.0/24 means the first 24 bits identify the network and the remaining 8 bits are for hosts — 256 total addresses, 254 usable.

How do I convert a subnet mask to CIDR?

The CIDR prefix is the number of 1 bits in the subnet mask — 255.255.255.0 has 24 ones, so it is /24. In this calculator you do not need to do it by hand: select the mask and the CIDR dropdown updates to match, and vice versa, because the two are kept in sync.

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

A subnet mask uses 1s for network bits and 0s for host bits (for example 255.255.255.0). A wildcard mask is the exact inverse — 0s for network bits and 1s for host bits (0.0.0.255). Subnet masks are used by most operating systems, while wildcard masks appear in Cisco router ACLs and OSPF configurations. The calculator shows both.

How do I find the network and broadcast address of a subnet?

Enter the IP address and prefix, and the calculator derives the network address (the IP bitwise-ANDed with the mask) and the broadcast address (the network address with all host bits set to 1). Both are listed in the results, and the binary breakdown shows the bit pattern behind each one.

What are the private IP address ranges?

Three ranges are reserved for internal networks and never routed on the public internet: 10.0.0.0/8 (16,777,216 addresses), 172.16.0.0/12 (1,048,576 addresses), and 192.168.0.0/16 (65,536 addresses). The calculator labels any address you enter as Private or Public.

What IPv6 prefix lengths are commonly used?

The IPv6 tab includes presets for the most common sizes: /48 is a typical site allocation from an ISP, /56 a common home allocation, /64 the standard subnet size required for SLAAC auto-configuration, and /128 a single host address.

Is my data private?

Yes. All IPv4 and IPv6 calculations run entirely in your browser using JavaScript. No IP addresses or network data are sent to any server, so the tool works the same whether you are online or offline.

Network Address -
Broadcast Address -
First Usable Host -
Last Usable Host -
Total Hosts -
Usable Hosts -
Subnet Mask -
Wildcard Mask -
IP Class -
IP Type -
Common:
Full Address -
Compressed Address -
Network Address -
First Address -
Last Address -
Prefix Length -
Total Addresses -
CIDR Subnet Mask Wildcard Mask Total Hosts Usable Hosts
Enter an IP address and select a CIDR prefix or subnet mask to calculate instantly
The CIDR and Subnet Mask dropdowns are synced — changing one updates the other
Click Binary Breakdown to see network bits (purple) vs host bits (green)
Use the CIDR Reference tab to look up any prefix from /0 to /32
Click any row in the CIDR table to auto-fill the IPv4 calculator
For IPv6, use the preset buttons (/48, /56, /64, /128) for common prefix lengths
All calculations run locally in your browser
Want to learn more? Read documentation →
1/8
Start typing to search...
Searching...
No results found
Try searching with different keywords