Back to Home 100% Free

IP Subnet Calculator

Calculate IPv4 & IPv6 network addresses, broadcast boundaries, wildcard masks, usable host ranges, binary octet representations, and CIDR subnet tables 100% offline.

IPv4 Address & Subnet Mask

Enter IPv4 host address and select CIDR prefix or subnet mask.

Detected IP Class: Class C (Private)

Network Boundaries

PRIVATE (RFC 1918)
Network Address 192.168.1.0
Broadcast Address 192.168.1.255
SUBNET MASK 255.255.255.0
WILDCARD MASK 0.0.0.255
USABLE HOSTS 254
FIRST USABLE IP 192.168.1.1
LAST USABLE IP 192.168.1.254
HEX ADDRESS C0A80196
32-Bit Binary Octets Representation
IP: 11000000.10101000.00000001.10010110
Mask: 11111111.11111111.11111111.00000000
Formula & Subnet Derivation
Formula: Network Address = IP Address AND Subnet Mask
Binary AND Operation on Octets:
IP: 11000000.10101000.00000001.10010110
Mask: 11111111.11111111.11111111.00000000
Net: 11000000.10101000.00000001.00000000 (192.168.1.0)

Subnet Calculation History & Saved Networks

Save and track multiple network subnets locally in browser memory.

Related Tools

Explore more free tools that pair well with this one.

CALCULATOR

Calorie Calculator

Free Calorie Calculator to estimate daily calorie needs, BMR, TDEE, BMI, healthy weight, protein, carbs, fats, water intake, and weight loss or muscle gain calories. Includes meal planner, calorie burn calculator, nutrition charts, food energy converter, and downloadable reports.

CALCULATOR

Concrete Calculator

Calculate concrete volume, bags, weight, cost, cement, sand, gravel, and reinforcement instantly with our advanced Concrete Calculator for slabs, columns, footings, stairs, walls, driveways, and more.

CALCULATOR

Salary Calculator

Free Salary Calculator to estimate hourly, daily, weekly, monthly, quarterly, and annual income. Calculate gross salary, net pay, taxes, deductions, overtime, bonuses, retirement contributions, and download detailed salary reports instantly.

CALCULATOR

Fraction Calculator

Use our advanced Fraction Calculator to add, subtract, multiply, divide, simplify, compare, convert, and calculate mixed fractions instantly with full step-by-step solutions.

CALCULATOR

Mortgage Calculator

Use our free Mortgage Calculator to estimate monthly mortgage payments, total interest, loan payoff schedule, amortization table, property taxes, insurance, PMI, and more.

CALCULATOR

BMR Calculator

Free BMR Calculator to calculate your Basal Metabolic Rate and Total Daily Energy Expenditure (TDEE). Supports Mifflin-St Jeor, Harris-Benedict, and Katch-McArdle formulas with macro plans and meal distribution.

Computer Networking & IP Architecture Guide

The Ultimate Guide to IPv4/IPv6 Subnetting, CIDR Notation, Binary Math & VLSM Network Planning

IP subnetting is the foundational pillar of modern IP routing, enterprise network design, cloud architecture, and cybersecurity engineering. **Zee AI Tools IP Subnet Calculator** provides a 100% offline, enterprise-grade networking utility supporting IPv4/IPv6 subnets, CIDR prefix conversions, bitwise binary operations, wildcard masks, and VLSM network planning.

1. What is Subnetting and How Bitwise AND Operations Function

Subnetting splits a single physical network into multiple logical sub-networks (subnets). Network devices determine whether a destination IP is local or remote by performing a bitwise AND operation between their own IP address and subnet mask:

\(\text{Network Address} = \text{IP Address} \text{ (AND)} \text{ Subnet Mask}\)

Concretely, for the address 192.168.1.150 with mask 255.255.255.0, each octet of the IP is ANDed against the matching octet of the mask: a mask octet of 255 (all 1s in binary) always keeps the IP's octet unchanged, while a mask octet of 0 (all 0s) always zeroes it out, regardless of what the IP's bits were. That's why 192.168.1.150 under a /24 mask resolves to the network address 192.168.1.0 — the first three octets pass through unchanged and the last octet is zeroed. The broadcast address is calculated the complementary way, by OR-ing the IP against the wildcard mask (the bitwise inverse of the subnet mask), which forces every host bit to 1 instead of 0.

2. Classful IP Addressing vs. Classless Inter-Domain Routing (CIDR)

In 1993, RFC 1519 replaced rigid Class A, B, and C networks with CIDR (Classless Inter-Domain Routing) to prevent IPv4 address exhaustion:

Class A (1.0.0.0 – 126.255.255.255):

Default Mask 255.0.0.0 (/8). Supports 16.7 Million hosts per network.

Class B (128.0.0.0 – 191.255.255.255):

Default Mask 255.255.0.0 (/16). Supports 65,534 hosts per network.

Class C (192.0.0.0 – 223.255.255.255):

Default Mask 255.255.255.0 (/24). Supports 254 hosts per network.

3. Reserved Private IP Ranges (RFC 1918)

RFC 1918 defines non-routable private IP address spaces reserved for local area networks (LANs):

Address Block IP Range CIDR Prefix Total Host Addresses
10.0.0.0 Block10.0.0.0 – 10.255.255.25510.0.0.0/816,777,216 Addresses
172.16.0.0 Block172.16.0.0 – 172.31.255.255172.16.0.0/121,048,576 Addresses
192.168.0.0 Block192.168.0.0 – 192.168.255.255192.168.0.0/1665,536 Addresses

4. IPv6 Architecture & 128-Bit Subnetting

IPv6 replaces 32-bit IPv4 addresses with 128-bit hexadecimal addresses, yielding \(3.4 \times 10^{38}\) unique IP addresses. Standard IPv6 subnets utilize a fixed /64 prefix length, reserving 64 bits for the network prefix and 64 bits for Interface ID.

Being precise about what this page's IPv6 module actually does: it accepts a compressed IPv6 address (like 2001:db8:85a3::8a2e:370:7334) and a prefix length dropdown, and its expandIpv6() function performs genuine expansion — filling in the elided :: block and zero-padding every hextet back out to its full 4-digit form (2001:0db8:85a3:0000:0000:8a2e:0370:7334) and displays it alongside the compressed original. Beyond formatting, the module now performs real 128-bit network math using JavaScript's BigInt: for the address and prefix length you select, it computes the actual network prefix address, the full first-to-last address range covered by that prefix, and the total address count in the subnet — the same category of arithmetic the IPv4 module performs, just scaled to 128 bits instead of 32. The "Address Scope / Type" label is also a genuine RFC 4291 classification rather than a fixed placeholder: it distinguishes a link-local fe80::/10 address, a unique-local fc00::/7 address, a multicast ff00::/8 address, the loopback ::1, and the documentation range 2001:db8::/32 from an ordinary global unicast address. One thing IPv6 still has no equivalent of is a broadcast address or a "usable hosts = total minus 2" subtraction — every address in the computed range, including the network address itself, is a valid host address under IPv6's addressing model, so treat the displayed range as the full address block rather than an IPv4-style usable/unusable split.

5. 5 Essential Network Subnetting Best Practices

  • Use VLSM for Efficiency: Assign /30 or /31 subnets to point-to-point router links to conserve IP space.
  • Reserve Gateway Addresses: Assign the first usable IP (.1) or last usable IP (.254) consistently as your default gateway.
  • Implement Route Summarization: Aggregate multiple contiguous subnets into single CIDR routes on WAN routers.
  • Isolate Traffic with VLANs: Separate VoIP phones, guests, and database servers onto distinct subnets.

6. How to Use This Calculator, Step by Step

The interface is split into four module tabs — IPv4 Subnet, IPv6 Subnet, CIDR Reference Cheat Sheet, and VLSM Subnet Planner — plus a persistent results panel on the right that reflects whichever IPv4 calculation is currently loaded.

  1. Enter an IPv4 address. Type any dotted-decimal address (e.g. 192.168.1.150) into the address field, or click "Random Private" / "Random Public" to generate a sample instantly.
  2. Choose a prefix. The Subnet Mask / CIDR Prefix dropdown lists every value from /1 through /32; each option shows both the CIDR notation and its equivalent dotted-decimal mask (e.g. "/24 — 255.255.255.0 (254 hosts)"), so you don't need to memorize the conversion.
  3. Read the results panel. As soon as you change the address or prefix, the right-hand panel recalculates the Network Address, Broadcast Address, Subnet Mask, Wildcard Mask, Usable Hosts, First/Last Usable IP, Hex Address, and the full 32-bit binary octet breakdown for both the IP and the mask — every one of these values is computed live from your input via bitwise operations, not looked up from a static table.
  4. Expand "Formula & Subnet Derivation" to see the exact binary AND operation performed between your IP and mask, spelled out octet by octet, which is useful for confirming your own manual subnetting arithmetic.
  5. Switch to the CIDR Reference tab for a scrollable /8 through /32 lookup table of subnet masks, wildcard masks, and usable host counts — handy as a standalone cheat sheet even without a specific address in mind.
  6. Save calculations you want to revisit. The "Save Current" button in the History section stores the network, mask, and host count for the currently displayed IPv4 result into your browser's local storage, and the search box lets you filter saved entries later.
  7. Export or print your results. The Copy, CSV, TXT, and Print buttons all package the same set of computed IPv4 values for pasting into documentation, a ticket, or a network diagram.

7. Real-World Use Cases for a Subnet Calculator

Home & Small Office Router Setup

Confirming the usable host range and broadcast address of a router's default LAN (commonly 192.168.1.0/24) before assigning static IPs to printers, NAS devices, or IoT hardware.

Cloud & VPC Network Design

Working out how many usable addresses a given CIDR block leaves for EC2 instances, Kubernetes pods, or Azure/GCP subnets before provisioning infrastructure-as-code templates.

Firewall & ACL Rule Writing

Converting a subnet mask into its wildcard-mask equivalent for Cisco IOS access control lists or OSPF network statements, which use wildcard masks instead of standard subnet masks.

Network+ / CCNA Exam Preparation

Checking manual subnetting homework against the tool's binary AND breakdown to catch arithmetic mistakes before they become exam-day habits.

Documenting Existing Infrastructure

Generating a clean CSV or TXT export of network boundaries for a specific segment when writing network diagrams or onboarding documentation for a new team member.

Troubleshooting "Can't Reach That Device" Issues

Quickly confirming whether two IP addresses actually sit on the same subnet, or whether a misconfigured mask is the reason two devices can't see each other on a LAN.

8. Common Subnetting Mistakes to Avoid

  • Assigning the network or broadcast address to a device. The first address in a subnet (all host bits 0) identifies the network itself, and the last address (all host bits 1) is the broadcast address — neither can be assigned to a host, which is exactly why "usable hosts" is always 2 less than the subnet's total address count for prefixes /1 through /30.
  • Confusing a subnet mask with a wildcard mask. A subnet mask marks network bits with 1s (255.255.255.0); a wildcard mask is its bitwise inverse and marks "don't care" bits with 1s (0.0.0.255) — mixing them up in a Cisco ACL will match the exact opposite set of addresses you intended.
  • Forgetting that /31 and /32 are special cases. A /32 identifies a single host with no network/broadcast distinction (1 usable address), and a /31 (per RFC 3021) is a two-address point-to-point link where both addresses are usable — the "subtract 2" rule for usable hosts does not apply to either.
  • Overlapping VLSM subnets. When manually carving a base network into differently-sized subnets for different departments, forgetting to track already-allocated ranges is the single most common cause of an accidental IP conflict.
  • Treating private RFC 1918 ranges as globally unique. Because 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are reused by millions of separate private networks, they must never be assumed unique when merging two networks (e.g. after a company acquisition or a VPN site-to-site link) — always check for overlap first.

9. A Worked VLSM Example: Subdividing 192.168.1.0/24

Variable Length Subnet Masking is easiest to understand with a concrete example, using the same base network and host requirements pre-filled into the VLSM Planner tab above (192.168.1.0/24 split for departments needing 50, 30, 10, and 2 hosts). The core technique is to sort requirements largest-to-smallest and allocate the smallest block that satisfies each one:

Hosts Needed Smallest Block That Fits Allocated Subnet Usable Range
50/26 (62 usable)192.168.1.0/26.1 – .62
30/27 (30 usable)192.168.1.64/27.65 – .94
10/28 (14 usable)192.168.1.96/28.97 – .110
2/30 (2 usable)192.168.1.112/30.113 – .114

Notice how each subnet's starting address picks up exactly where the previous block's total address range ends (0 → 64 → 96 → 112), and each block size is a power of 2 large enough to cover the requirement plus the mandatory network and broadcast addresses. You can verify any one of these four allocations independently by plugging its network address and CIDR prefix into the IPv4 Subnet tab above and confirming the computed broadcast address and usable range match this table — a good habit whenever you're planning VLSM by hand, regardless of which tool or spreadsheet you use to do the initial carve-up.

10. Privacy & Offline Operation

Every calculation on this page — the IPv4 bitwise AND/OR/NOT operations, the IPv6 address expansion, the CIDR table generation, and the binary octet rendering — runs in plain client-side JavaScript with no network request involved. Nothing you type into the address, mask, or host-requirement fields is sent to any server, logged, or shared with a third party; you could disconnect from the internet entirely after the page finishes loading and every module would keep working exactly the same way.

The only persistence mechanism is your browser's own localStorage, used exclusively by the "Save Current" history feature so your saved subnets survive a page refresh or a browser restart; that data stays on your device, under the zee_ip_history key, and is never transmitted anywhere. Clearing it is one click away via the "Clear" button in the History section, and because it's plain localStorage, clearing your browser's site data for this domain removes it just as completely. This makes the tool reasonably safe to use for documenting real internal network ranges, VPN site-to-site configurations, or infrastructure topology without exposing that information to a third party — though as with any browser-stored data, avoid saving history on a shared or public computer if the ranges themselves are sensitive.

11. IPv4 vs. IPv6 at a Glance

Property IPv4 IPv6
Address Length32 bits128 bits
Notation192.168.1.12001:db8::1
Total Address Space~4.3 billion~340 undecillion
Typical Subnet SizeVaries (/8 to /30)Fixed /64 for LANs
Broadcast AddressYes (last address in subnet)No (uses multicast instead)
Private RangesRFC 1918 (10/8, 172.16/12, 192.168/16)Unique Local Addresses (fc00::/7)

One detail worth internalizing: IPv6 has no concept of a broadcast address at all — a holdover from IPv4 that IPv6's designers deliberately removed in favor of multicast and anycast addressing. This is also why the "usable hosts = total minus 2" arithmetic that governs every IPv4 result on this page simply doesn't apply to IPv6 subnets, and why a serious IPv6 planning tool needs a different calculation model than the one this page's IPv4 module uses. Keep that distinction in mind whenever you're translating IPv4 subnetting habits directly onto an IPv6 deployment plan.

Frequently Asked Questions (10 FAQs)

Detailed answers to top IP subnetting, CIDR notation, wildcard masks, and IPv6 questions. Click any question to expand.