Enterprise-Grade • 100% Client-Side • RFC 1918 & RFC 3021 Ready

Subnet Calculator

Free, fast, and interactive online subnet calculator and CIDR range calculator. Compute IPv4 & IPv6 subnets, usable host IP ranges, subnet masks, default gateways, and Cisco wildcard masks with real-time bit-level binary visualization.

Presets:
✓ Valid

Dotted decimal IPv4 notation (0.0.0.0 - 255.255.255.255)

Routing prefix length (/0 to /32)

Subnet netmask (synced with CIDR)

Live Calculation Enabled
Network Profile:Class CPrivate (RFC 1918)
Hex: 0xC0A8010AInteger: 3232235786
Network Address
192.168.1.0
First address in subnet (Network ID)
Broadcast Address
192.168.1.255
Last address in subnet (Broadcast)
Usable Host IP Range
192.168.1.1 – 192.168.1.254
Assignable host addresses for servers, routers, PCs
Subnet Mask
255.255.255.0
Bitmask identifying network vs host bits
Wildcard Mask
0.0.0.255
Inverse mask for Cisco ACL & OSPF
Usable Hosts
254
Total usable devices (2^host - 2)
Total Addresses
256
CIDR: 192.168.1.0/24

Bit-Level Binary Representation32-Bit IPv4

Visual breakdown of Network bits (prefix) vs. Host bits with exact CIDR boundary line.

Network Bits (24)
Host Bits (8)
Binary Netmask:11111111.11111111.11111111.00000000
Boundary Cut: Bit 24

Subnet Partitioning & Splitter

Divide the current network into smaller, equal subnets.

Subnet Breakdown Table2 Subnets

Detailed breakdown of all subnets resulting from the selected network division.

#Subnet (CIDR)Network IPUsable Host RangeBroadcast IPUsable HostsSubnet Mask
Comprehensive Networking Guide

Complete Guide to IP Subnetting and CIDR Calculation

Subnetting is the fundamental architectural discipline of partitioning a single physical or virtual IP network into multiple smaller, logically segmented broadcast domains. Whether you are provisioning virtual private clouds (VPCs) across AWS, Azure, or Google Cloud, isolating departmental VLANs, or preparing for Cisco CCNA and CompTIA Network+ certifications, our enterprise-grade subnet calculator provides the precision, speed, and bit-level transparency needed to plan error-free IP networks.

What is an IP Subnet Calculator and Why is Subnetting Essential?

An ip subnet calculator (also referred to as an ip subnet calc or subnet calc) parses an IP address together with a network prefix to instantly compute crucial network boundaries. Without an online subnet calculator, network engineers are forced to perform tedious manual binary arithmetic—converting decimal octets into 8-bit binary strings, executing bitwise AND/OR operations, and calculating power-of-two exponential host limits.

By utilizing an automated ip address subnet calculator, systems administrators prevent common human configuration errors such as overlapping address spaces, misconfigured broadcast addresses, and routing loops. Subnetting enhances network security by isolating sensitive assets (such as database clusters, PCI payment boundaries, and management planes) into dedicated broadcast domains while reducing unnecessary broadcast chatter across local area networks.

Core Subnetting FormulasRFC 1519 / RFC 4632

  • Total IP Addresses:2(32 - CIDR)
  • Usable Host Capacity:2(32 - CIDR) - 2
  • Network ID:IP & Subnet Mask (Bitwise AND)
  • Broadcast ID:Network ID | ~Subnet Mask (Bitwise OR)
  • Wildcard Mask:255.255.255.255 - Subnet Mask

Dual-Stack Network Planning: IPv4 Subnet Calculator vs. IPv6 Subnet Calculator

Modern network infrastructures operate in a dual-stack transitional environment, making both an ipv4 subnet calculator and an ipv6 subnet calculator essential daily tools for systems engineers.

IPv4 Subnetting Dynamics

An ipv4 subnet calculator manages a 32-bit address space limited to roughly 4.29 billion theoretical addresses. Addresses are expressed in dotted-decimal format (e.g., 192.168.1.1). Because IPv4 space is scarce, network administrators must practice variable-length subnet masking (VLSM) and micro-segmentation to conserve every available IP. Subnets such as /30 (2 usable hosts) and RFC 3021 /31 (2 usable point-to-point hosts) are frequently deployed to interconnect routers with minimal address waste.

IPv6 Prefix Allocation

By comparison, an ipv6 subnet calculator operates across a 128-bit hexadecimal addressing scheme providing 340 undecillion addresses. Rather than conserving individual IP addresses, IPv6 design emphasizes hierarchical route aggregation. Regional Internet Registries (RIRs) allocate /32 blocks to ISPs, enterprises receive /48 blocks, customer sites receive /56 blocks, and individual local subnets universally use /64 prefixes. A single /64 subnet provides 18.4 quintillion unique host addresses, powering Stateless Address Autoconfiguration (SLAAC).

Understanding CIDR Ranges, Subnet Masks, and Default Gateways

Classless Inter-Domain Routing (CIDR) replaced the legacy, inflexible Class A, B, and C system in 1993. A dedicated cidr subnet calculator and subnet calculator cidr allow engineers to express prefixes compactly using slash notation. For instance, a /24 prefix indicates that the first 24 bits represent the network portion, leaving 8 bits for client host interfaces.

Subnet Mask Calculator

A subnet mask calculator converts CIDR prefixes into dotted-decimal netmasks (such as 255.255.255.0). It delineates the exact boundary separating network bits (contiguous 1s) from assignable host bits (contiguous 0s).

Wildcard Mask Calculator

A wildcard mask calculator outputs the bitwise inverse of the subnet mask (e.g., 0.0.0.255). Wildcard masks are required in Cisco IOS Access Control Lists (ACLs), OSPF area definitions, and enterprise firewall rule engines.

Default Gateway Calculator

A default gateway calculator specifies the router interface IP for client devices. In network administration conventions, the default gateway is designated as either the first usable host IP (e.g., 192.168.1.1) or the last usable host IP (192.168.1.254).

When planning cloud VPC peering, hybrid WANs, or on-premises migrations, pairing a cidr range calculator with an ip range calculator and general ip calculator enables administrators to compute the exact start IP, end IP, and bounding cidr range. This prevents overlapping route propagation and guarantees clean border gateway protocol (BGP) routing advertisements.

Why Engineers Switch from Legacy Desktop Utilities (e.g., SolarWinds IP Subnet Calculator)

For decades, IT administrators and telecom technicians relied on downloadable desktop software such as the solarwinds ip subnet calculator or command-line scripts. While utilities like the SolarWinds calculator were popular in on-premises Windows server environments, modern cloud-first engineering workflows require instant, zero-footprint web utilities.

Feature ComparisonSubnetCalculator.org (Online Subnet Calculator)Legacy SolarWinds IP Subnet Calculator
Installation & OS Requirements✓ Instant web access, 0 MB install, all OS & mobileRequires executable download, Windows admin rights
Privacy & Data Security✓ 100% Client-Side execution, zero telemetryInstalled binary software, potential corporate audit oversight
Binary Bit-Level Visualizer✓ Real-time 32-bit interactive binary boundary mapStatic text-only tabular outputs
Dual-Stack Protocol Support✓ Full IPv4 and modern IPv6 subnets in one tabOften separated across standalone legacy tool modules
RFC 3021 /31 Subnet Compatibility✓ Fully supported with automated 2-host detectionFrequently reports /31 subnets as invalid or 0 usable hosts

Whether you are troubleshooting a Cisco router console over SSH, provisioning Kubernetes cluster pod CIDRs, or verifying an Access Control List on a mobile phone in a server rack room, this lightweight ip address calculator and ip subnet calc delivers lightning-fast results without installation barriers or paywalls.

Most Common Subnet Masks Reference Chart

Standard CIDR prefixes, subnet masks, usable host counts, and primary networking use cases.

Complete /0 - /32 Sheet
PrefixSubnet MaskWildcard MaskTotal IPsUsable HostsPrimary CCNA / Cloud Use Case
/32255.255.255.2550.0.0.011 (Host route)Single host route, loopback interface, VPN client endpoint
/31255.255.255.2540.0.0.122 (RFC 3021)Point-to-point serial links (RFC 3021, saves IP address space)
/30255.255.255.2520.0.0.342Traditional point-to-point WAN links between two routers
/29255.255.255.2480.0.0.786Small DMZ, multi-firewall gateway cluster, small branch office
/28255.255.255.2400.0.0.151614Server farm tier, micro-services cluster, management VLAN
/27255.255.255.2240.0.0.313230Departmental subnet (e.g. Finance, HR), small office floor
/26255.255.255.1920.0.0.636462Medium departmental subnet, database pool, staging environments
/25255.255.255.1280.0.0.127128126Half Class C network, large office department, corporate Wi-Fi
/24255.255.255.00.0.0.255256254Standard LAN, home router subnet (192.168.1.0/24), cloud subnet
/20255.255.240.00.0.15.2554,0964,094Kubernetes Pod CIDR network, corporate campus network
/16255.255.0.00.0.255.25565,53665,534Standard AWS VPC / Azure VNet block (e.g. 10.0.0.0/16), Docker bridge

Related Networking Calculators

Explore dedicated tools for CIDR, VLSM planning, Cisco ACLs, and routing summarization.

View all tools

Frequently Asked Questions

Clear answers to common questions about subnetting, CIDR notation, and network design.

What is a Subnet Calculator and what does it do?
A subnet calculator (or IP subnet calculator) is an essential networking utility that parses an IP address together with a subnet mask or CIDR prefix. It instantly calculates key network boundaries: the Network Address (Network ID), Broadcast Address, First Usable Host IP, Last Usable Host IP, Total IP count, and Usable Host capacity. Systems administrators and network engineers use it to design network segments, allocate IP spaces, prevent overlapping subnets, and configure router interfaces and firewalls.
How do you calculate a subnet and how do you use this tool?
To calculate a subnet using SubnetCalculator.org:
  1. Enter any valid IPv4 address (e.g. 192.168.1.10) or IPv6 address.
  2. Select your routing prefix (e.g. /24) or corresponding dotted-decimal subnet mask (255.255.255.0).
  3. The tool immediately calculates all 8 network boundaries, renders a 32-bit binary visualizer distinguishing network bits from host bits, and outputs equal subnet partitions with one-click copy buttons.
How many hosts and total IPs are in a subnet? What is the IP formula?
The formula for total IP addresses in an IPv4 subnet is 2^(32 - CIDR).
The formula for assignable usable hosts is 2^(32 - CIDR) - 2.
We subtract 2 because the first address is reserved as the Network ID and the last address is reserved as the Broadcast address. For example, in a /24 subnet: 32 - 24 = 8 host bits. Total IPs = 2^8 = 256. Usable hosts = 256 - 2 = 254 usable hosts. (Note: Under RFC 3021, /31 point-to-point subnets provide 2 usable hosts with no broadcast address).
How can I find my subnet mask and which subnet does a host belong to?
To find your current computer's subnet mask:
  • Windows: Open Command Prompt and type ipconfig (check 'IPv4 Address' and 'Subnet Mask').
  • macOS / Linux: Open Terminal and run ifconfig or ip addr.
To find which subnet any host IP belongs to, perform a bitwise AND operation between the host IP and the subnet mask. For example, 192.168.1.55 AND 255.255.255.0 yields the Network ID 192.168.1.0. Any host whose bitwise AND equals 192.168.1.0 belongs to that same subnet.
What subnet mask should I use for my network?
Select your subnet mask based on the required host capacity per segment:
  • /24 (255.255.255.0): Most common for standard office LANs and home routers (up to 254 usable hosts).
  • /23 (255.255.254.0): Medium departmental networks (up to 510 usable hosts).
  • /22 (255.255.252.0) or /20 (255.255.240.0): Enterprise corporate campuses or cloud VPCs (1,022 to 4,094 hosts).
  • /29 (255.255.255.248): Small DMZ subnets or firewall clusters (6 usable hosts).
  • /30 (255.255.255.252) or /31 (255.255.255.254): Point-to-point router interconnections.
What is the subnet mask of 192.168.1.1/24? Is 192.168.1 a subnet?
The subnet mask of 192.168.1.1/24 is 255.255.255.0. The Network ID is 192.168.1.0, the usable host range is 192.168.1.1 through 192.168.1.254, and the broadcast address is 192.168.1.255.
By itself, 192.168.1 is an incomplete 3-octet expression; when written in proper CIDR notation as 192.168.1.0/24, it is a full, valid Class C private RFC 1918 subnet.
How many hosts and IP addresses are in a /27 subnet?
A /27 subnet contains 32 total IP addresses and 30 usable hosts.
Calculation: 32 total bits - 27 network bits = 5 host bits. 2^5 = 32 total IPs. Subtracting 2 (Network ID and Broadcast) yields 30 usable hosts. The subnet mask is 255.255.255.224 and the wildcard mask is 0.0.0.31.
How many hosts are in a /21 subnet and how many IPs are in a /20 subnet?
  • /21 Subnet: 11 host bits (32 - 21 = 11). Total IPs = 2^11 = 2,048. Subtracting 2 gives 2,046 usable hosts with a subnet mask of 255.255.248.0.
  • /20 Subnet: 12 host bits (32 - 20 = 12). Total IPs = 2^12 = 4,096 total IP addresses, providing 4,094 usable hosts with a subnet mask of 255.255.240.0.
How big is a /30 subnet and why use a /32 subnet mask?
  • A /30 subnet provides 4 total IP addresses and 2 usable hosts (subnet mask 255.255.255.252). It has historically been the standard block for point-to-point links between two routers.
  • A /32 subnet mask (255.255.255.255) represents a single host route (1 host) with 0 host bits. It is used for router loopback interfaces, VPN client tunnel endpoints, static host routes, and specific firewall policy exceptions.
Is 255.255.255.0 a /24 or /32?
255.255.255.0 is a /24. In binary, the first three octets are all 1s (8 + 8 + 8 = 24 contiguous 1-bits) and the fourth octet is 0. A /32 subnet mask is 255.255.255.255, where all 32 bits are binary 1s.
What does a subnet mask of 0.0.0.0 mean?
A subnet mask of 0.0.0.0 represents /0 in CIDR prefix notation. It indicates that zero bits are allocated to the network prefix, effectively matching all 4,294,967,296 IPv4 addresses. In routing tables, 0.0.0.0/0 denotes the Default Route (Gateway of Last Resort), directing all unmapped traffic toward the internet.
What is a .255 IP address and can it be assigned to a device?
In a standard /24 subnet (such as 192.168.1.0/24), the IP address ending in .255 is the dedicated Directed Broadcast Address and cannot be assigned to an individual host. However, in larger subnets such as /23, /22, or /16, an address ending in .255 (e.g. 10.0.1.255/16) is simply an ordinary, fully usable host IP address because it is neither the first nor the last address in that larger block.
What is the difference between Class B and Class C subnets? Is 192 Class B or C, and is 255.255.0.0 Class B?
Under historical classful IPv4 addressing:
  • Class B: Addresses from 128.0.0.0 to 191.255.255.255 with default subnet mask 255.255.0.0 (/16), accommodating 65,534 hosts per network. Yes, 255.255.0.0 is the default Class B subnet mask.
  • Class C: Addresses from 192.0.0.0 to 223.255.255.255 with default subnet mask 255.255.255.0 (/24), accommodating 254 hosts per network.
  • Therefore, any address starting with 192 (such as 192.168.x.x) is historically a Class C address. Since 1993, CIDR allows flexible prefixes regardless of original class boundaries.
How can I learn subnetting effectively?
To master subnetting quickly:
  1. Memorize Powers of Two: 1, 2, 4, 8, 16, 32, 64, 128, 256.
  2. Learn the 8-Bit Netmask Values: 128 (/25), 192 (/26), 224 (/27), 240 (/28), 248 (/29), 252 (/30), 254 (/31), 255 (/32).
  3. Use the Magic Number Method: Subtract the interesting octet value from 256 (e.g., 256 - 224 = 32; subnets increment in block sizes of 32).
  4. Practice with Visualizers: Use our interactive bit-level visualizer on SubnetCalculator.org to observe how binary boundaries divide network and host bits.
Copied to clipboard