Skip to content

IP Subnet Calculator

Calculate IP subnet information with our free online calculator. Enter an IP address and CIDR notation to find network address, broadcast address, subnet mask, and usable hosts. Essential for network administrators and engineers.

Reset

Frequently asked questions

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation represents an IP address and its subnet mask as IP/prefix (e.g., 192.168.1.0/24). The prefix number indicates how many bits are used for the network portion.

What is a subnet mask?

A subnet mask defines which part of an IP address is the network and which is the host. A /24 mask (255.255.255.0) means the first 24 bits are network, leaving 8 bits (256 addresses) for hosts.

What is the network address?

The network address is the first address in a subnet and identifies the network itself. It cannot be assigned to a host. It's calculated by ANDing the IP address with the subnet mask.

Why are usable hosts 2 less than total?

Two addresses in each subnet are reserved: the network address (first) and broadcast address (last). The broadcast address sends packets to all hosts in the network. Hence, usable hosts = 2^(32-CIDR) - 2.

What is the difference between public and private IP addresses?

Public IP addresses are globally unique and routable on the internet. Private IPs (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) are reserved for local networks and not routable on the internet. Private IPs enable multiple devices to share a single public IP through NAT (Network Address Translation).

How do I choose the right subnet size?

Calculate the number of hosts needed and add 30% for growth. A /24 subnet provides 254 hosts, /25 gives 126, /26 gives 62, /27 gives 30. Choose the smallest subnet that accommodates your needs to avoid wasting IP addresses. Consider separating different departments or functions into different subnets for security.

What is VLSM and why is it important?

VLSM (Variable Length Subnet Masking) allows different subnet sizes within the same network, optimizing IP address allocation. Instead of using /24 for all subnets, you can use /30 for point-to-point links (2 hosts) and /23 for larger departments, reducing IP waste and improving network design.

Can I use a /31 or /32 subnet?

A /32 subnet contains only 1 address and is used for host routes, not networks. A /31 subnet (RFC 3021) is used for point-to-point links in IPv4, providing exactly 2 addresses with no network or broadcast address. Standard subnets require /30 (4 addresses, 2 usable) for point-to-point connections.

What tools do network administrators use subnetting for?

Network admins use subnetting to segment networks for security, improve performance by reducing broadcast domains, organize departments logically, implement VLANs, plan IP address allocation, configure routers and firewalls, troubleshoot connectivity issues, and design scalable network architectures.

How does IPv6 subnetting differ from IPv4?

IPv6 uses 128-bit addresses (vs 32-bit IPv4) with typical allocations of /64 for subnets (providing 2^64 hosts). Standard IPv6 prefix is /48 for organizations, /56 for sites, /64 for subnets. IPv6's vast address space eliminates the need for NAT and complex VLSM planning required in IPv4.

About OneClick Pro

OneClick Pro is a free collection of more than 150 web tools for everyday work: converting images and units, formatting and validating code, checking domains and SEO, and working with text, dates and numbers. Every tool runs without registration or subscription, and what you enter is only used to calculate your result and is never stored. Use it as a quick toolbox for one-off tasks, or bookmark the tools you rely on every day.