{ IPv4 Subnet Calculator }

// calculate ipv4 subnets, hosts, and ranges in one click

Calculate IPv4 subnet masks, network addresses, broadcast IPs, host ranges and CIDR notation instantly. Free browser-based tool, no sign-up required.

Enter an IPv4 address (e.g. 10.0.0.0)
Dotted decimal (255.255.255.0) or CIDR (/24)
QUICK SELECT:
🌐

Ready to calculate

Enter an IP address and subnet mask, then click Calculate

HOW TO USE

  1. 01
    Enter IP Address

    Type any valid IPv4 address such as 192.168.1.0 or 10.0.0.1

  2. 02
    Enter Subnet Mask

    Use dotted decimal (255.255.255.0) or CIDR prefix (/24). Quick-select buttons available.

  3. 03
    View Results

    Network address, broadcast IP, usable host range, total hosts, binary representation, and more.

FEATURES

CIDR Notation Host Range Binary View Wildcard Mask Broadcast IP Subnet Split Class Detection Copy Results

USE CASES

  • 🔧 Network design and planning
  • 🔧 Firewall rule configuration
  • 🔧 VLSM and CIDR subnetting
  • 🔧 DevOps infrastructure setup
  • 🔧 Studying for CCNA/Network+ exams

WHAT IS THIS?

An IPv4 Subnet Calculator helps you break down IP address spaces into smaller networks. Enter any IP and subnet mask to instantly see the network address, broadcast address, usable host range, and more — including binary representations and subnet splitting.

RELATED TOOLS

FREQUENTLY ASKED QUESTIONS

What is a subnet mask?

A subnet mask is a 32-bit number that divides an IP address into a network portion and a host portion. Common examples include 255.255.255.0 (/24) which allows 254 usable hosts, or 255.255.0.0 (/16) which allows 65,534 usable hosts.

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation expresses the subnet mask as the number of 1-bits in the mask. For example, /24 means the first 24 bits are the network portion, equivalent to 255.255.255.0. CIDR ranges from /0 to /32.

What is a broadcast address?

The broadcast address is the last address in a subnet range. Packets sent to this address are delivered to all hosts on the subnet. It cannot be assigned to a device. For 192.168.1.0/24, the broadcast address is 192.168.1.255.

How many usable hosts does a /24 have?

A /24 subnet has 256 total addresses (2⁸). Two are reserved: the network address and the broadcast address. This leaves 254 usable host addresses. The formula is 2^(32-prefix) − 2 for prefixes /1 through /30.

What is a wildcard mask?

A wildcard mask is the inverse of the subnet mask. It is commonly used in ACLs (Access Control Lists) on routers and firewalls. For a /24 subnet mask (255.255.255.0), the wildcard mask is 0.0.0.255. You can calculate it by subtracting the mask from 255.255.255.255.

What are IPv4 address classes?

IPv4 addresses are historically divided into classes: Class A (1.0.0.0–126.255.255.255, /8 default), Class B (128.0.0.0–191.255.255.255, /16 default), Class C (192.0.0.0–223.255.255.255, /24 default). Private ranges include 10.x.x.x, 172.16–31.x.x, and 192.168.x.x.

What is /30 used for?

A /30 subnet provides only 2 usable host addresses, making it ideal for point-to-point links between two routers. It wastes fewer IPs than larger subnets in these connections. /31 (RFC 3021) provides exactly 2 addresses and can also be used for point-to-point links.

Can I use this for private IP ranges?

Yes. This tool works with any valid IPv4 address, including private ranges defined in RFC 1918: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. These are the most common ranges for internal networks and home routers.

What is an IPv4 Subnet Calculator?

An IPv4 Subnet Calculator is a network tool that breaks down an IP address and subnet mask into all the details you need to understand or design a network. It instantly computes the network address, broadcast address, first and last usable host IP, total host count, wildcard mask, CIDR prefix, and binary representations of all values — saving you from tedious manual binary math.

Whether you are a network engineer configuring VLANs, a DevOps engineer setting up cloud VPCs, or a student studying for the CCNA or CompTIA Network+ exam, this calculator gives you accurate results in milliseconds.

How IPv4 Subnetting Works

Every IPv4 address is a 32-bit number, typically written in dotted-decimal notation (e.g., 192.168.1.0). A subnet mask is another 32-bit number that determines which part of the address identifies the network and which part identifies individual hosts. When you apply a subnet mask to an IP address using a bitwise AND operation, you get the network address.

For example, applying the mask 255.255.255.0 to 192.168.1.45 yields the network address 192.168.1.0. The broadcast address is found by setting all host bits to 1, giving 192.168.1.255. The usable range is everything in between: 192.168.1.1 through 192.168.1.254 — a total of 254 hosts.

Understanding CIDR Notation

CIDR (Classless Inter-Domain Routing) notation condenses the subnet mask into a single number — the count of consecutive 1-bits starting from the left. So /24 means the first 24 bits are the network part, equivalent to the mask 255.255.255.0. CIDR makes routing tables more compact and is universally used in modern networking.

Common CIDR prefixes and their properties:

Network Address vs Broadcast Address

Within any subnet, two addresses are reserved and cannot be assigned to hosts:

The network address is the first address in the range, where all host bits are set to 0. It identifies the subnet itself and is used in routing tables. You cannot ping it like a normal host.

The broadcast address is the last address in the range, where all host bits are set to 1. Packets sent to this address are delivered to every host on the subnet. This is used by protocols like ARP and DHCP to reach all devices simultaneously.

Wildcard Masks Explained

A wildcard mask is the bitwise complement of a subnet mask. Where the subnet mask has a 1, the wildcard mask has a 0, and vice versa. Wildcard masks are primarily used in Cisco IOS ACLs (Access Control Lists) and OSPF area configurations. They let you specify which bits of an IP address must match and which can vary.

For a /24 network (mask 255.255.255.0), the wildcard mask is 0.0.0.255. An ACL entry like permit ip 192.168.1.0 0.0.0.255 matches all addresses in the 192.168.1.0/24 range.

Subnetting Use Cases

Network segmentation: Splitting a large network into smaller subnets isolates traffic, improves performance, and enhances security. For example, a /16 network can be divided into 256 /24 subnets for different departments or floors in a building.

Cloud VPC design: AWS, Azure, and GCP all use CIDR notation for Virtual Private Clouds. Understanding subnets is essential for designing cloud networks, assigning address spaces to availability zones, and planning for growth.

Firewall rules: Security groups and ACLs use CIDR ranges to allow or deny traffic. Knowing your subnet boundaries ensures firewall rules are neither too broad (security risk) nor too narrow (blocks legitimate traffic).

DHCP configuration: DHCP servers need to know the network address, broadcast address, and subnet mask to assign IP addresses and hand out correct gateway and DNS information to clients.

Private vs Public IP Ranges

RFC 1918 defines three ranges of private IPv4 addresses that are not routed on the public internet:

Other special ranges include 127.0.0.0/8 (loopback, localhost), 169.254.0.0/16 (link-local / APIPA), and 0.0.0.0/8 (unspecified). This tool works correctly with all of these ranges.

Binary Representation

Seeing the binary form of IP addresses and masks makes subnetting concepts immediately clear. The network bits are the ones that align with 1s in the subnet mask; the host bits align with 0s. This calculator shows the binary breakdown for the IP, subnet mask, network address, broadcast address, and wildcard mask so you can see exactly where the network/host boundary falls.

Exam Preparation (CCNA, Network+)

Subnetting is a core topic on the CompTIA Network+, Cisco CCNA, and other networking certifications. The ability to quickly calculate subnet boundaries, host counts, and CIDR notation in your head — or verify your work with a tool — is essential for passing these exams. Use this calculator to check your manual calculations and build intuition for common subnet sizes.

☕