Skip to main content

IP Subnet Calculator

Enter an IPv4 address with CIDR prefix (e.g., 192.168.1.0/24) to calculate the network address, subnet mask, broadcast address, usable host range, and total hosts. Binary breakdown included.

✓ Network & broadcast address ✓ Host range & total hosts ✓ Runs 100% in your browser

Frequently Asked Questions

What is CIDR notation?▼

CIDR (Classless Inter-Domain Routing) notation combines an IP address with a prefix length to define a network range. For example, 192.168.1.0/24 means a network with a 24-bit subnet mask (255.255.255.0), giving 254 usable host addresses.

How do I calculate the number of usable hosts?▼

Usable hosts = 2^(32 - prefix) - 2. The -2 subtracts the network address (all host bits 0) and broadcast address (all host bits 1). For /24: 2^8 - 2 = 254. For /16: 2^16 - 2 = 65,534. For /30: 2^2 - 2 = 2 (common for point-to-point links).

What is a subnet mask?▼

A subnet mask is a 32-bit number that divides an IP address into network and host portions. /24 → 255.255.255.0, /16 → 255.255.0.0, /8 → 255.0.0.0. In binary, it's a contiguous block of 1s followed by 0s.

What is the difference between network address and broadcast address?▼

The network address (first address, all host bits = 0) identifies the subnet and cannot be assigned to a host. The broadcast address (last address, all host bits = 1) sends packets to all hosts on the subnet and also cannot be assigned.

What subnet should I use for a home/office network?▼

For small home networks, 192.168.1.0/24 (254 hosts) is standard. For medium offices, 10.0.0.0/22 (1022 hosts) or /23 (510 hosts) works well. For cloud VPCs, /16 gives room for multiple subnets. Reserve /28 or /30 for infrastructure point-to-point links.

How are private IP address ranges defined?▼

RFC 1918 defines three private ranges: 10.0.0.0/8 (Class A, ~16M addresses), 172.16.0.0/12 (Class B, ~1M addresses), and 192.168.0.0/16 (Class C, ~65K addresses). These are not routed on the public internet and require NAT to access external services.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →