Subnet Mask Calculator

Calculate IP subnets and network addresses

Subnet Calculator

Calculate IP subnet information

About

Subnetting divides networks into smaller segments. CIDR notation (e.g., /24) indicates network bits.

Privacy & Security

All subnet calculations happen entirely in your browser using JavaScript. No IP addresses, network configurations, or calculation data is transmitted to any server or stored. Your network information remains completely private and secure.

No Data Storage
No Tracking
100% Browser-Based

About This Subnet Calculator

Master IP subnetting with our comprehensive subnet calculator. Whether you're a network engineer designing network infrastructure, a student learning subnetting concepts, or an IT professional troubleshooting network issues, this tool provides instant calculations for subnet masks, CIDR notation, network addresses, broadcast addresses, and usable host ranges. Input an IP address with subnet mask or CIDR notation, and get complete subnet information including binary representations, wildcard masks, and IP class details.

Key Features

CIDR Notation Support

Enter IP addresses in CIDR format (e.g., 192.168.1.0/24) for quick calculations

Subnet Mask Conversion

Automatically converts between dotted decimal and CIDR notation

Network Address Calculation

Computes the network address for any given IP and subnet mask

Broadcast Address Detection

Calculates the broadcast address for the subnet

Usable Host Range

Shows first and last usable IP addresses in the subnet

Host Count Calculation

Displays total number of usable hosts (2^n - 2)

Binary Representation

Shows IP addresses and subnet masks in binary format for learning

Wildcard Mask Display

Calculates wildcard masks for ACL configurations

IP Class Identification

Identifies IP class (A, B, C, D, E) and default subnet mask

Subnet Splitting

Calculate how to divide networks into smaller subnets

How to Use the Subnet Calculator

1

Enter IP Address

Input an IPv4 address with subnet mask (e.g., 192.168.1.0/24 or 192.168.1.0 255.255.255.0)

2

View Subnet Information

See network address, broadcast address, host range, and all subnet details instantly

3

Analyze Binary Representation

Review binary formats to understand how subnet masks work at the bit level

4

Copy or Export Results

Save subnet calculations for network documentation or configuration files

Frequently Asked Questions

What is CIDR notation and how does it work?

CIDR (Classless Inter-Domain Routing) notation represents IP addresses and subnet masks compactly. For example, /24 means the first 24 bits are the network portion, leaving 8 bits for hosts. This equals subnet mask 255.255.255.0 and allows 254 usable hosts (2^8 - 2).

Why are there 2 fewer usable hosts than total addresses?

Every subnet reserves two addresses: the network address (all host bits = 0) identifies the subnet itself, and the broadcast address (all host bits = 1) sends packets to all hosts. These cannot be assigned to individual devices, reducing usable hosts by 2.

What's the difference between subnet mask and wildcard mask?

Subnet masks use 1s for network bits and 0s for host bits (e.g., 255.255.255.0). Wildcard masks are the inverse, using 0s for network bits and 1s for host bits (e.g., 0.0.0.255). Wildcard masks are commonly used in Cisco router ACLs.

How do I calculate the number of subnets needed?

Use the formula 2^n â‰Ĩ number of subnets, where n is the number of subnet bits borrowed from the host portion. For example, borrowing 3 bits gives 2^3 = 8 subnets. Our calculator shows how different subnet masks affect subnet counts.

What is a /32 subnet, and when would I use it?

A /32 subnet has all 32 bits set for the network, meaning it represents a single IP address with no host range. It's used in routing tables for host-specific routes, loopback addresses, or when configuring point-to-point links.

Can I use this calculator for IPv6?

This calculator is designed for IPv4 subnetting. IPv6 uses a different addressing scheme with 128-bit addresses and different subnetting practices. We may add IPv6 support in the future based on user demand.

How do I subnet a Class C network into smaller subnets?

Enter a Class C network (e.g., 192.168.1.0/24) and change the subnet mask to a larger value (e.g., /26, /27, /28). The calculator will show how the network divides into smaller subnets, each with fewer hosts.

What are private IP address ranges?

Private IP ranges (RFC 1918) are: 10.0.0.0/8 (Class A), 172.16.0.0/12 (Class B), and 192.168.0.0/16 (Class C). These addresses are not routed on the public Internet and are used for internal networks. Our calculator identifies if an IP is private or public.

Common Use Cases

  • Network Design and Planning: Calculate subnet sizes when designing network architecture for organizations
  • VLSM Implementation: Plan Variable Length Subnet Masks for efficient IP address allocation
  • Subnetting Certification Exams: Practice and verify subnetting calculations for CCNA, Network+, and other certifications
  • Router Configuration: Determine correct network and wildcard masks for router ACLs and routing tables
  • Firewall Rule Creation: Calculate IP ranges for firewall rules and security policies
  • IP Address Troubleshooting: Verify if an IP address belongs to a specific subnet during network diagnostics
  • Cloud Network Setup: Plan VPC subnets for AWS, Azure, or Google Cloud deployments
  • Network Documentation: Generate accurate subnet information for network diagrams and documentation

Why Use Our Subnet Calculator?

Our subnet calculator provides the most comprehensive subnetting information available, combining ease of use with educational value. Whether you're configuring enterprise networks or studying for certifications, you get instant, accurate calculations with detailed binary representations that help you understand the underlying concepts. The tool supports both CIDR notation and traditional subnet masks, making it versatile for any workflow. Completely free, no registration required, and all calculations happen instantly in your browser. Trusted by network engineers, students, and IT professionals worldwide.