Home / Calculators / Subnet Calculator

Subnet Calculator

subnet-calculator

Subnet Calculator - Free Online IP Subnet Mask Calculator

Our free subnet calculator computes network details for any IP address and subnet mask. Enter an IP address and CIDR prefix to see the network address, broadcast address, usable host range, netmask, and wildcard mask. Works for IPv4 subnets.

How to Use

  1. Enter an IP address in the search box (like 192.168.0.0).
  2. Select a subnet mask in CIDR notation from the dropdown (like /25).
  3. Click Calculate to view all network details.

The calculator accepts CIDR prefixes from /1 to /48. Common values include /24 for a Class C-sized network, /16 for Class B, and /8 for Class A. The results update instantly with accurate calculations.

What is a Subnet?

A subnet is a smaller network within a larger IP network. Think of it like dividing a building into separate apartments. Each apartment has its own address, but they all share the same building location. Subnets let network administrators split a network into manageable sections.

Subnetting helps organize devices, improve security, and reduce network traffic. A company might use one subnet for office computers, another for guest WiFi, and another for servers. Each subnet operates independently.

The subnet mask determines the size of each subnet. Written in CIDR notation as a slash number (/24, /25, /26), it tells devices which part of the IP address identifies the network and which part identifies individual devices.

Why Use a Subnet Calculator?

Network administrators use this tool when setting up new networks. Before configuring routers and switches, you need to know how many IP addresses each subnet will contain. A /24 network gives you 254 usable addresses, while a /25 gives you 126.

IT professionals troubleshoot connectivity issues with subnet calculations. When devices can't communicate across networks, the problem often traces to incorrect subnet mask settings. The calculator verifies your expected values match reality.

Students learning networking use subnet calculators to practice. Subnetting involves binary math that takes time to master. The tool shows instant results so you can verify your manual calculations and learn faster.

Cloud engineers planning AWS VPCs or Azure virtual networks need precise CIDR calculations. Many cloud services require you to specify subnet ranges during setup. Overlapping subnets cause configuration failures.

Understanding Your Results

Network Address - The first IP in the subnet. All devices on this network share this address as their network identifier. In our example, 192.168.0.0 identifies the network itself.

Broadcast Address - The last IP in the subnet. This address sends data to all devices on the network at once. It cannot be assigned to individual devices. In our example, 192.168.127.255 is the broadcast address.

First Usable IP - The lowest IP address that can be assigned to a device. Network addresses and broadcast addresses are reserved, so the first usable IP is always network address plus one.

Last Usable IP - The highest IP address available for devices. This is always the broadcast address minus one. Devices can use everything between first and last usable IP.

Total Hosts - The complete count of IP addresses in the subnet. This includes the network address, broadcast address, and all usable addresses. A /25 has 128 total addresses.

Usable Hosts - The number of devices you can actually assign IP addresses to. This is always total hosts minus 2, because the network and broadcast addresses cannot be used for devices.

Netmask - The subnet mask in dotted decimal format. It shows which portion of the IP address represents the network. A /17 subnet has netmask 255.255.128.0.

Wildcard Mask - The inverse of the subnet mask. Network devices use it for access control lists and routing. Where the netmask has 255, the wildcard has 0, and vice versa.

Example Results Table

Below is an example calculation for IP address 192.168.0.0 with /17 subnet mask:

Field Value
Network Address 192.168.0.0
Broadcast Address 192.168.127.255
First Usable IP 192.168.0.1
Last Usable IP 192.168.127.254
Total Hosts 32766
Usable Hosts 32766
Netmask 255.255.128.0
Wildcard Mask 0.0.127.255

FAQ

What is a subnet calculator?

A subnet calculator computes network details for an IP address and subnet mask. It shows the network address, broadcast address, usable host range, and other information needed for network configuration.

What is CIDR notation?

CIDR notation represents subnet masks as a slash followed by a number, like /24 or /25. The number indicates how many bits of the IP address represent the network portion. Higher numbers mean smaller subnets with fewer host addresses.

What is a subnet mask?

A subnet mask is a number that divides an IP address into network and host portions. It looks like an IP address, such as 255.255.255.0. Devices use it to determine whether other devices are on the same network or need routing.

What is a network address?

The network address is the first IP in a subnet. It identifies the subnet itself and cannot be assigned to devices. All devices on the same subnet share this network address as part of their identity.

What is a broadcast address?

The broadcast address is the last IP in a subnet. Data sent to this address reaches all devices on the network. Like the network address, it cannot be assigned to individual devices.

What is a wildcard mask?

A wildcard mask is the inverse of a subnet mask. Where subnet mask has 255, wildcard mask has 0. Network administrators use wildcard masks in access control lists and routing configurations.

How many usable hosts in a /24 subnet?

A /24 subnet has 256 total addresses but only 254 usable hosts. Two addresses are reserved: one for the network address and one for broadcast.

How do I calculate subnet mask from CIDR?

Each CIDR bit represents one 255 in the subnet mask. A /24 equals 255.255.255.0. A /25 equals 255.255.255.128. Each additional bit doubles the number of subnets while halving the hosts.

What is the difference between total hosts and usable hosts?

Total hosts includes all IP addresses in the subnet. Usable hosts excludes the network address and broadcast address, which cannot be assigned to devices. Usable hosts always equals total hosts minus 2.

What does /25 mean in subnetting?

A /25 subnet has 25 bits for the network and 7 bits for hosts. This gives 128 total addresses and 126 usable hosts. It's half the size of a /24 network.

How many subnets can I create with a /16?

A /16 network (65536 addresses) can be divided into many subnets depending on your chosen prefix. A /24 subnets from a /16 gives you 256 subnets. The number doubles with each additional bit borrowed.

What is a Class C subnet?

A Class C network traditionally uses a /24 subnet mask (255.255.255.0). It provides 256 total addresses with 254 usable hosts. This is the most common subnet size for small networks.

Can I use 0.0.0.0 as a subnet mask?

No, 0.0.0.0 is not a valid subnet mask. Valid subnet masks are consecutive 1s followed by consecutive 0s. The smallest valid subnet is /1, covering half the internet.

How do I know what subnet mask to use?

Choose a subnet mask based on how many devices need IP addresses. A /24 suits small offices with up to 254 devices. Larger networks need /16 or bigger. Cloud services often require /16 or /17 for virtual networks.

All Calculators