Advertisement Space

IP Subnet Calculator

Calculation Results

Network Address
0.0.0.0
Broadcast Address
0.0.0.0
Subnet Mask
0.0.0.0
CIDR Notation
/0
Total Hosts
0
Usable Hosts
0
Subnet Details:
First Usable IP: 0.0.0.1
Last Usable IP: 0.0.0.254
IP Range: 0.0.0.0/0
Wildcard Mask: 0.0.0.0
IP Class: --

How to Use the IP Subnet Calculator

IP/CIDR Method

Enter an IP address and CIDR notation (slash notation). CIDR is a compact representation where /24 means the first 24 bits are the network portion. This is the most modern way to represent subnets. Simply enter both values and the calculator computes all subnet information.

IP/Mask Method

Enter an IP address and the traditional subnet mask (e.g., 255.255.255.0). The calculator converts this to CIDR notation and provides all subnet details including network address, broadcast address, and usable IP ranges.

IP Classes Method

Enter an IP address and specify the number of hosts you need. The calculator determines the appropriate subnet class (A, B, or C) and suggests the optimal subnet mask and CIDR notation for your requirements.

Tip: Understanding subnets is essential for network administration. Network Address is the first IP (used for routing), Broadcast Address is the last IP (for sending to all hosts), and Usable Host addresses are in between.

Understanding IP Addresses & Subnets

IP Address Basics

An IPv4 address consists of 4 octets (each 0-255), written as dotted decimal notation: 192.168.1.100. Each address is 32 bits. IP addresses are divided into two parts: Network Address (identifies the network) and Host Address (identifies the device on that network).

Subnet Masks

A subnet mask determines which portion of an IP address is the network and which is the host. Written in the same dotted decimal format as IP addresses. For example, 255.255.255.0 means the first 3 octets identify the network, and the last octet identifies the host. This is equivalent to /24 in CIDR notation.

CIDR Notation

CIDR (Classless Inter-Domain Routing) simplifies subnet representation using a slash followed by the number of network bits. For example, 192.168.1.0/24 means the first 24 bits are the network portion. This is more flexible and widely used in modern networks.

Network Classes

  • Class A: 1.0.0.0 - 126.255.255.255 (first octet 1-126). Supports 16+ million hosts per network. Default mask: 255.0.0.0 (/8)
  • Class B: 128.0.0.0 - 191.255.255.255 (first octet 128-191). Supports 65,000+ hosts per network. Default mask: 255.255.0.0 (/16)
  • Class C: 192.0.0.0 - 223.255.255.255 (first octet 192-223). Supports 254 hosts per network. Default mask: 255.255.255.0 (/24)
  • Class D: 224.0.0.0 - 239.255.255.255 (first octet 224-239). Reserved for multicast
  • Class E: 240.0.0.0 - 255.255.255.255 (first octet 240-255). Reserved for experimental use

Private IP Ranges

Reserved for private networks and not routable on the public Internet:

  • Class A Private: 10.0.0.0 - 10.255.255.255 (10.0.0.0/8)
  • Class B Private: 172.16.0.0 - 172.31.255.255 (172.16.0.0/12)
  • Class C Private: 192.168.0.0 - 192.168.255.255 (192.168.0.0/16)

Common Subnet Masks Reference

/24 (Class C)

Mask 255.255.255.0
Hosts 254
Common Use Small Networks

/25 (Class C)

Mask 255.255.255.128
Hosts 126
Common Use Subnetting

/16 (Class B)

Mask 255.255.0.0
Hosts 65,534
Common Use Medium Networks

/30 (Point-to-Point)

Mask 255.255.255.252
Hosts 2
Common Use Router Links

/8 (Class A)

Mask 255.0.0.0
Hosts 16+ Million
Common Use Large Networks

/32 (Single Host)

Mask 255.255.255.255
Hosts 1
Common Use Host Routes

Network Subnetting Best Practices

Plan Your Network Size

  • Count devices: Include computers, printers, IP phones, IoT devices, and future growth (usually add 20-30% buffer)
  • Choose appropriate CIDR: /24 for small office (254 hosts), /22 for medium (1,022 hosts), /20 for large (4,094 hosts)
  • Reserve subnets: Separate subnets for different departments, floors, or functions improves security and organization

Subnet Allocation

  • Gateway: First usable IP (e.g., 192.168.1.1)
  • DHCP Pool: Reserve a range for dynamic assignment (e.g., 192.168.1.100-192.168.1.200)
  • Static IPs: Reserve range for servers, printers (e.g., 192.168.1.10-192.168.1.50)
  • Broadcast: Last address reserved for broadcast (e.g., 192.168.1.255)

VLANS & Subnetting

  • Separate departments: 192.168.1.0/24 for Admin, 192.168.2.0/24 for Sales, 192.168.3.0/24 for Production
  • Guest network: Isolated subnet with limited access
  • IoT devices: Separate VLAN to contain potential security risks

Common Mistakes to Avoid

  • Undersizing subnets: Not leaving room for growth causes expensive re-subnetting later
  • Overlapping subnets: Ensure no two subnets use the same IP address range
  • Ignoring documentation: Document your network design for future reference and troubleshooting
  • Forgetting router/gateway: Remember to reserve the first usable IP for the gateway/router

Frequently Asked Questions

What's the difference between /24 and 255.255.255.0?

They represent the same subnet mask. /24 is CIDR notation meaning 24 bits for network, 8 bits for host. 255.255.255.0 is decimal notation. Modern networks prefer /24 CIDR notation.

How many usable IPs in a /24 subnet?

A /24 subnet has 256 total addresses. The first is network address, last is broadcast. That leaves 254 usable host addresses (256 - 2 = 254).

Can I use 192.168.1.255 for a host?

No. The last address in every subnet (255 in the last octet for /24) is reserved for broadcast and cannot be assigned to devices.

What's a default gateway?

The gateway is typically the first usable IP (e.g., 192.168.1.1 in a 192.168.1.0/24 network). It's the router that handles traffic between subnets.

What are private IP ranges?

Reserved for internal use and not routable on the Internet: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. These are never assigned publicly.

How do I choose a subnet size?

Count your devices and add 20-30% for growth. /24 = 254 hosts, /25 = 126 hosts, /22 = 1,022 hosts. Choose the smallest that accommodates future expansion.

Advertisement Space