Skip to main content
🔥 Popular Science

IP Address Calculator — Subnet & Network Calculator

Free IP address calculator. Enter an IP and subnet mask to get network address, broadcast, host range, wildcard mask, and binary representation. Supports CIDR notation.

★★★★★ 4.8/5 · 📊 0 calculations · 🔒 Private & free

What Is an IP Address Calculator?

An IP address calculator (also called a subnet calculator) is a networking tool that computes the key properties of an IP network from an address and subnet mask. Given an IP like 192.168.1.100/24, it determines the network address, broadcast address, usable host range, wildcard mask, and other essential networking information.

Network engineers, system administrators, and IT students use subnet calculators daily for designing networks, troubleshooting connectivity, configuring firewalls, and planning IP address allocation. Understanding subnetting is fundamental to how the internet works — every device needs a unique IP address within its network, and subnet masks define the boundaries of those networks.

IPv4 addresses are 32-bit numbers written as four octets (e.g., 192.168.1.100). The subnet mask determines which bits identify the network and which identify individual hosts. A /24 mask means the first 24 bits are the network portion and the last 8 bits are for hosts, allowing 254 usable addresses (256 total minus network and broadcast addresses).

How Subnetting Works

Subnetting divides a larger network into smaller, more manageable subnetworks. It's the process of borrowing bits from the host portion of an IP address to create additional network addresses.

The subnet mask is a 32-bit number that separates the network bits from the host bits. In binary, it's a sequence of 1s followed by 0s. Common masks include:

CIDRSubnet MaskTotal IPsUsable HostsTypical Use
/8255.0.0.016,777,21616,777,214Class A network
/16255.255.0.065,53665,534Class B network
/24255.255.255.0256254Standard LAN
/25255.255.255.128128126Small office
/26255.255.255.1926462Department
/27255.255.255.2243230Small team
/28255.255.255.2401614Point-to-point links
/30255.255.255.25242Router-to-router link
/32255.255.255.25511Single host route

To calculate manually: Convert the IP and mask to binary, AND them together to get the network address, OR the IP with the inverted mask (wildcard) to get the broadcast address. The host range is everything between network+1 and broadcast-1.

Private vs. Public IP Addresses

RFC 1918 defines three ranges of private IP addresses that can be used freely within internal networks but are not routable on the public internet:

RangeCIDRTotal IPsTypical Use
10.0.0.0 – 10.255.255.25510.0.0.0/816.7 millionLarge enterprises, cloud VPCs
172.16.0.0 – 172.31.255.255172.16.0.0/121 millionMedium organizations
192.168.0.0 – 192.168.255.255192.168.0.0/1665,536Home networks, small offices

NAT (Network Address Translation) allows thousands of devices with private IPs to share a single public IP for internet access. Your home router performs NAT — all your devices have 192.168.x.x addresses internally but appear as one public IP to the outside world.

Other special ranges include: 127.0.0.0/8 (loopback — always refers to "this computer"), 169.254.0.0/16 (link-local/APIPA — assigned when DHCP fails), and 224.0.0.0/4 (multicast).

CIDR Notation Explained

CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its associated network mask in a compact format: IP/prefix-length. The prefix length is the number of leading 1-bits in the subnet mask.

For example, 192.168.1.0/24 means "the network starting at 192.168.1.0 with a 24-bit mask (255.255.255.0)." The /24 tells us that the first 24 bits are fixed (the network part) and the remaining 8 bits are variable (the host part).

CIDR replaced the old "classful" addressing system in 1993. Before CIDR, networks were rigidly divided into Class A (/8), Class B (/16), and Class C (/24). This was extremely wasteful — a company needing 300 addresses had to get a Class B with 65,534 addresses. CIDR allows any prefix length from /0 to /32, enabling much more efficient allocation.

CIDR is also essential for routing table aggregation (supernetting). Instead of advertising 256 individual /24 routes, an ISP can advertise one /16 route that covers all of them, dramatically reducing routing table size and improving internet performance.

Common Subnetting Scenarios

Home network: Most home routers use 192.168.1.0/24 or 192.168.0.0/24, providing 254 usable addresses. Unless you have hundreds of IoT devices, this is more than enough.

Office with departments: A /24 can be split into smaller subnets: four /26 subnets (62 hosts each) for engineering, sales, marketing, and guest Wi-Fi. This improves security (departments can't see each other's traffic without routing) and reduces broadcast domain size.

Cloud VPC: AWS, Azure, and GCP VPCs typically start with a /16 (65,534 hosts) divided into /24 subnets for different availability zones and tiers (public, private, database).

Point-to-point links: Router-to-router connections only need two IPs, so they use /30 (2 usable hosts) or /31 (2 hosts, per RFC 3021, no network/broadcast wasted).

IPv4 vs. IPv6

IPv4 uses 32-bit addresses, providing approximately 4.3 billion unique addresses. This seemed like plenty in the 1980s but was exhausted in 2011. NAT and private addressing have extended IPv4's life, but the long-term solution is IPv6.

IPv6 uses 128-bit addresses written in hexadecimal: 2001:0db8:85a3:0000:0000:8a2e:0370:7334. This provides approximately 3.4 × 10³⁸ addresses — enough to assign a unique IP to every atom on Earth's surface, many times over.

IPv6 subnetting works similarly to IPv4 but with a /64 prefix being the standard subnet size (providing 2⁶⁴ ≈ 18.4 quintillion host addresses per subnet). This calculator focuses on IPv4, which remains the dominant protocol for most networks.

Tips for Using This Calculator

What is the difference between network address and broadcast address?

The network address is the first address in a subnet — it identifies the network itself and cannot be assigned to a host. All host bits are 0. The broadcast address is the last address — packets sent to it are received by all hosts on the subnet. All host bits are 1. For 192.168.1.0/24, the network address is 192.168.1.0 and the broadcast is 192.168.1.255. Usable host addresses are everything in between: .1 to .254.

Why do I lose 2 addresses from each subnet?

Every subnet reserves two addresses: the network address (first, all host bits = 0) for identifying the network in routing tables, and the broadcast address (last, all host bits = 1) for sending packets to all hosts. A /24 has 256 total addresses minus these 2 = 254 usable. Exception: /31 subnets (RFC 3021) can use both addresses for point-to-point links, and /32 represents a single host.

What is a wildcard mask and when is it used?

A wildcard mask is the bitwise inverse of a subnet mask. Where the subnet mask has 1s, the wildcard has 0s, and vice versa. For subnet 255.255.255.0, the wildcard is 0.0.0.255. Wildcard masks are used in Cisco IOS access control lists (ACLs) and OSPF network statements. A wildcard of 0.0.0.255 means "match the first three octets exactly, ignore the last octet" — effectively matching all hosts in a /24 subnet.

What is VLSM (Variable Length Subnet Masking)?

VLSM allows different subnets within the same network to have different prefix lengths. Without VLSM, all subnets must be the same size. With VLSM, you can have a /24 for a 200-host department, a /27 for a 25-host team, and a /30 for a router link — all within the same /16 address space. This dramatically improves IP address utilization. All modern routing protocols (OSPF, EIGRP, BGP) support VLSM.

How many subnets can I create from a given network?

The number of subnets equals 2^(new bits borrowed). If you start with a /24 and subnet to /26, you borrowed 2 bits, creating 2² = 4 subnets of 62 hosts each. From a /24 to /28: 4 bits borrowed = 16 subnets of 14 hosts. From a /16 to /24: 8 bits = 256 subnets of 254 hosts each. The tradeoff is always: more subnets = fewer hosts per subnet.

What's the difference between public and private IP addresses?

Public IPs are globally unique and routable on the internet — assigned by ISPs from IANA-allocated blocks. Private IPs (10.x.x.x, 172.16-31.x.x, 192.168.x.x) can be reused by anyone within their internal network but cannot directly communicate on the internet. NAT translates between private and public addresses at the network boundary. Your home devices use private IPs; your router has one public IP from your ISP.

What is supernetting (CIDR aggregation)?

Supernetting combines multiple smaller networks into one larger network advertisement. For example, four /24 networks (192.168.0.0/24 through 192.168.3.0/24) can be aggregated into one /22 (192.168.0.0/22). This reduces routing table entries, improves router performance, and is essential for internet scalability. ISPs heavily use supernetting to summarize thousands of customer routes into a few aggregated advertisements.

Why is my IP address 192.168.x.x?

192.168.0.0/16 is a private IP range defined by RFC 1918. Your home router assigns addresses from this range (typically 192.168.1.x or 192.168.0.x) to devices on your local network using DHCP. This is the most common private range for consumer routers. All your devices share one public IP (assigned by your ISP) through NAT. The 192.168.x.x address only works within your local network.

What subnet mask should I use for my network?

Count the maximum number of devices that will need IP addresses, add ~20-30% for growth, and pick the smallest subnet that fits. For up to 14 hosts: /28. Up to 30: /27. Up to 62: /26. Up to 126: /25. Up to 254: /24. For home networks, /24 (254 hosts) is standard and sufficient. For enterprise networks, plan subnets based on departments, VLANs, and security zones rather than making one large subnet.

Can two devices have the same IP address?

Not on the same network — this causes an IP conflict, and one or both devices will lose connectivity. However, devices on different networks CAN have the same private IP address (e.g., your laptop at 192.168.1.5 and someone else's at 192.168.1.5 on their network). NAT makes this possible by translating to unique public IPs at the network edge. IP conflicts are typically caused by static IP misconfiguration or DHCP issues.

Network Troubleshooting with IP Calculations

Understanding IP subnetting is essential for diagnosing network problems. Here are common scenarios where subnet calculations matter:

Two devices can't communicate: If two devices are on different subnets without a router between them, they can't talk. For example, 192.168.1.50/24 and 192.168.2.50/24 are on different networks. Check that both devices have the same subnet mask and their IPs fall within the same network range. Use this calculator to verify they share the same network address.

DHCP exhaustion: If your /24 subnet has 254 usable addresses but 300 devices need IPs, some will fail to get an address. Symptoms include devices getting 169.254.x.x (APIPA) addresses. Solution: expand to a /23 (510 hosts) or segment into VLANs with separate subnets.

Broadcast storms: Large flat networks (e.g., a single /16 with 65,534 hosts) suffer from excessive broadcast traffic. Every ARP request, DHCP discover, and NetBIOS announcement is sent to all hosts. Subnetting into smaller /24 networks limits broadcast domains and improves performance.

VPN and remote access: When connecting via VPN, your device gets an IP in the VPN's subnet. If this conflicts with your local network (both using 192.168.1.0/24), traffic gets confused. The fix: use non-overlapping subnets (e.g., 10.8.0.0/24 for VPN, 192.168.1.0/24 for home).

Firewall rules: Access control lists use network addresses and wildcard masks. To block traffic from 10.0.0.0/8, the firewall rule uses network 10.0.0.0 with wildcard 0.255.255.255. Understanding CIDR notation is essential for writing correct and efficient firewall rules.

Subnet Planning Best Practices

Designing an IP addressing scheme for an organization requires planning ahead. Here are industry best practices used by network engineers:

Plan for growth: Don't allocate the smallest possible subnet for current needs. If a department has 20 computers, use a /26 (62 hosts) or /25 (126 hosts) rather than a /27 (30 hosts). Expanding a subnet later often requires renumbering all devices, which is disruptive.

Use consistent sizing: Many organizations standardize on /24 for user VLANs, /27 or /28 for management networks, and /30 for point-to-point links. Consistency makes troubleshooting easier because anyone can quickly identify the network boundaries.

Reserve space for infrastructure: Typically the first few addresses in each subnet are reserved for routers and switches (.1 for default gateway, .2-.3 for redundant gateways, .4-.10 for network infrastructure). Document these conventions.

Separate by function: Use different subnets for different purposes — user workstations, servers, printers, VoIP phones, wireless clients, guest Wi-Fi, and IoT devices should each have their own subnet. This enables security policies (e.g., IoT devices can't access finance servers) and simplifies traffic monitoring.

Use RFC 1918 space wisely: Start with 10.0.0.0/8 for large organizations (allows hierarchical allocation: 10.site.vlan.host). Use 172.16-31.x.x for medium networks. Reserve 192.168.x.x for small offices or lab environments. Avoid using the same ranges as common VPN providers to prevent conflicts.

Document everything: Maintain an IP address management (IPAM) spreadsheet or tool showing every subnet, its purpose, VLAN ID, gateway, DHCP scope, and utilized addresses. Without documentation, subnet sprawl becomes unmanageable within months.