Essential answers to common networking, subnet mask, CIDR, and host calculation questions.
To calculate a subnet mask, determine the number of network bits from the CIDR prefix length (e.g., /24). Convert the consecutive network bits to binary 1s and the host bits to 0s across 4 octets of 8 bits each. For a /24 prefix, this results in 24 ones followed by 8 zeros: 11111111.11111111.11111111.00000000. Converting each 8-bit octet into decimal produces 255.255.255.0. Alternatively, enter your IP and prefix length into our interactive subnet calculator to compute the mask instantly.
Yes, 255.255.255.0 and /24 represent the exact same subnet mask. The notation 255.255.255.0 is the dotted-decimal representation, while /24 is CIDR (Classless Inter-Domain Routing) notation indicating 24 consecutive binary 1-bits (8 + 8 + 8 = 24 bits). Both allocate 24 bits for the network identifier and 8 bits for hosts, yielding 256 total IP addresses and 254 usable host endpoints.
A subnet mask is a 32-bit binary number used in IPv4 networking to separate an IP address into two distinct components: the Network ID (identifying the specific network segment) and the Host ID (identifying the specific device or interface). It works by setting all network bits to binary 1 and all host bits to binary 0, allowing routers to determine whether destination traffic is local or must be routed through a gateway.
For most home and small office networks connected via a Wi-Fi router, the default subnet mask is 255.255.255.0 (or /24). You can verify your device’s exact subnet mask by running "ipconfig" on Windows (Command Prompt), "ip addr" or "ifconfig" on Linux, or by checking System Settings > Network > TCP/IP on macOS. You can also paste your assigned local IP into our subnet calculator to inspect your complete subnet boundaries.
A /32 subnet mask (255.255.255.255) represents a single host route with 32 network bits and 0 host bits. Because all 32 bits are masked, it contains exactly 1 IP address with no network or broadcast overhead. /32 masks are widely used for router loopback interfaces, VPN client connections, firewall security rules, and static routes pointing to an exact single device.
The subnet mask you need depends on the required number of usable host devices per subnet plus room for future expansion:
• 2 hosts (router links): /31 (255.255.255.254 per RFC 3021) or /30 (255.255.255.252)
• Up to 6 hosts: /29 (255.255.255.248)
• Up to 14 hosts: /28 (255.255.255.240)
• Up to 30 hosts: /27 (255.255.255.224)
• Up to 62 hosts: /26 (255.255.255.192)
• Up to 126 hosts: /25 (255.255.255.128)
• Up to 254 hosts (standard office LAN): /24 (255.255.255.0)
• Up to 1,022 hosts: /22 (255.255.252.0)
Our visual subnet divider can automatically recommend the best prefix for your capacity.
A 255.255.255.252 subnet (CIDR prefix /30) contains 4 total IP addresses: 1 Network Address (e.g. .0), 2 Usable Host IP addresses (e.g. .1 and .2), and 1 Broadcast Address (e.g. .3). Historically, /30 subnets were the standard allocation for point-to-point serial and WAN links connecting two routers.
The 192.168.0.0 address block is an RFC 1918 private Class C space. By default, most home routers and local office networks use a subnet mask of 255.255.255.0 (/24) for individual LANs such as 192.168.1.0/24 or 192.168.0.0/24 (giving 254 usable hosts). However, the entire RFC 1918 reservation spans 192.168.0.0/16 with a subnet mask of 255.255.0.0, containing 65,536 total IP addresses.
You can find any subnet mask with our online subnet calculator by typing any target IP address into the input console and adjusting the prefix selector. The tool instantly calculates the dotted-decimal subnet mask (e.g. 255.255.255.0), hexadecimal mask (0xFFFFFF00), Cisco wildcard mask (0.0.0.255), and 32-bit binary representation in real time.
To calculate usable hosts per subnet, our subnet calculator applies the formula 2^(32 - CIDR) - 2. For example, for a /24 network: 32 - 24 = 8 host bits, giving 2^8 - 2 = 256 - 2 = 254 usable host endpoints. The two subtracted addresses are the reserved network wire ID and the segment broadcast address.
To calculate subnets with our calculator: 1) Enter your IP address (e.g. 192.168.1.1), 2) Pick your subnet mask or drag the CIDR slider (/0 to /32), and 3) Instantly read the network ID, first usable IP, last usable IP, broadcast address, and host count. For dividing networks, switch to the "Subnet Divider" tab to automatically slice a parent block into smaller VLANs.
The subnet calculator on ipvsubnetcalculator.com is an open-access, client-side web utility that computes IP routing boundaries, subnet masks, CIDR notations, usable host IP ranges, broadcast addresses, and Cisco wildcard masks in real time. It supports IPv4, IPv6, and visual subnet slicing with zero server latency.
A subnet calculator is a specialized software tool designed for network engineers, system administrators, and cloud architects. It performs bitwise Boolean operations (AND, OR, NOT) on 32-bit IPv4 or 128-bit IPv6 addresses to determine routing boundaries, prevent IP address overlaps, and simplify network subnetting.
To find which subnet a host IP belongs to, enter the host IP address (e.g. 172.16.45.100) and the subnet mask or prefix (e.g. /22) into our IPv4 calculator console. The calculator performs a bitwise AND between the IP and mask to reveal the exact subnet network wire ID (172.16.44.0), the usable host range (172.16.44.1 – 172.16.47.254), and the broadcast address (172.16.47.255).
Using our subnet calculator takes three simple steps: 1) Enter any IPv4 or IPv6 address into the Target IP box. 2) Select your desired subnet mask from the dropdown or move the CIDR slider. 3) Review the live telemetry panel to view your network address, usable host IP range, broadcast address, total host capacity, and interactive 32-bit binary octet matrix.
In any subnet calculator, host capacity is dictated by the remaining host bits: h = 32 - prefix. Total IP addresses equal 2^h, and usable hosts equal 2^h - 2 (except /31 point-to-point links per RFC 3021 which provide 2 usable hosts, and /32 single host routes which provide 1 IP). Our CIDR reference sheet displays host counts for every prefix from /0 to /32.
Our "What is my subnet mask" calculator tool allows you to enter your computer's local IPv4 address (e.g. 192.168.1.15 or 10.0.0.25) to identify the standard subnet mask (255.255.255.0 for Class C or 255.0.0.0 for Class A), view your gateway boundary, and calculate the maximum number of devices supported on your local subnet.
To determine what subnet mask to use, calculate the peak number of devices needed on your network segment and add a 20-30% safety margin. If you need 50 devices, a /26 mask (255.255.255.192, 62 usable hosts) is optimal. If you need 200 devices, a /24 mask (255.255.255.0, 254 usable hosts) is standard. Our CIDR reference table helps you choose the exact prefix.
To use the subnet calculator: 1) Input your base IP address, 2) Select your prefix length (/0 to /32), 3) Instantly read calculated values including Network ID, Broadcast IP, First Usable Host, and Last Usable Host. For dividing networks into multiple VLANs or cloud subnets, open the "Subnet Divider" tab to carve subnets automatically.
When subdividing a network block, the number of created subnets equals 2^b (where b is borrowed subnet bits), and usable hosts per subnet equals 2^(32 - new_prefix) - 2. For example, dividing a /24 network into /26 subnets borrows 2 bits, creating 2^2 = 4 subnets with 62 usable hosts each. Our Subnet Divider calculates this division automatically.
A subnet calculator is an essential network engineering utility that converts IP addresses and subnet masks into network identifiers, broadcast boundaries, usable host IP ranges, and wildcard masks. It eliminates error-prone manual binary conversions when designing enterprise LANs, configuring Cisco/Juniper routers, or deploying AWS/Azure cloud VPCs.
Both define the boundary between the network portion and host portion of an IP address. In an ip address subnet calculator, a subnet mask is written in dotted-decimal format (e.g. 255.255.255.0), whereas a subnet calculator CIDR counts consecutive leading 1-bits (e.g. /24). Both represent an identical 24-bit network mask.
A visual subnet calculator renders the 32 bits of an IPv4 address graphically across 4 octets, showing the exact boundary between network bits (1s) and host bits (0s). Network engineers and students can visually inspect how shifting the prefix slider from /24 to /26 partitions a block into 4 subnets with 62 usable hosts each, making bitwise arithmetic intuitive.
While a subnet calculator IPv4 handles 32-bit addresses and focuses on conserving scarce addresses using VLSM, an IPv6 subnet calculator manages 128-bit hexadecimal addresses. In IPv6, the standard end-user subnet is /64, offering 18.4 quintillion addresses for SLAAC (Stateless Address Autoconfiguration), eliminating the need for NAT and broadcast addresses.
In any network subnet calculator or networking subnet calculator, RFC 1918 defines three private non-routable address pools: Class A (10.0.0.0/8), Class B (172.16.0.0/12), and Class C (192.168.0.0/16). These address blocks are reserved for local enterprise LANs, home networks, and cloud VPCs, requiring NAT (Network Address Translation) to reach the public internet.
Under legacy networking rules, point-to-point router links used /30 subnets (4 total IPs, but only 2 usable, wasting 50% of the addresses). RFC 3021 enables 31-bit prefixes (/31) on point-to-point links, where both IP addresses are directly assigned to router interfaces with zero network or broadcast overhead.
A wildcard mask is the bitwise inverse of a subnet mask (calculated by subtracting the subnet mask from 255.255.255.255). It is used primarily by Cisco IOS in Access Control Lists (ACLs) and dynamic routing protocols like OSPF and EIGRP. For example, the wildcard mask for 255.255.255.0 is 0.0.0.255.