Calculator.org.in
Calculator

Subnet And IP Address Calculator

Calculate IPv4 subnet details including network address, broadcast address, usable host range, subnet mask, wildcard mask, and CIDR notation.

  • subnet
  • ip subnet
  • cidr
  • subnet mask
  • wildcard mask

Enter an IPv4 address such as 192.168.1.10.

Enter the slash value from 0 to 32, such as 24 for /24.

Status: initial

Results

Awaiting calculation

Explore your result

Subnet capacity

Explore the subnet and ip address calculator result visually while keeping this page's detailed guidance and examples.

Subnet capacity
Total addresses256
Usable hosts254
Host bits8 bits
Block size256

Use this result well

  1. 1Verify the calculator inputs.
  2. 2Compare the key result relationships.
  3. 3Review the page guidance before acting.

Network and broadcast addresses are normally unavailable to hosts.

Calculator guide

Introduction

IPv4 subnetting divides a network into address blocks. This calculator takes an IPv4 address and CIDR prefix length, then returns the network address, broadcast address, usable host range, subnet mask, wildcard mask, host bits, block size, nearby prefix reference, ACL-style wildcard example, and binary breakdown.


Purpose

Use this calculator to check subnet math while planning small networks, studying networking concepts, configuring routers, reviewing firewall rules, validating CIDR notation, or converting between prefix, subnet mask, and wildcard mask.


How subnet calculation works

The calculator converts the IPv4 address and subnet mask into 32-bit numbers. The network address is found with a bitwise AND between the IP address and mask. The broadcast address is found by combining the network address with the wildcard mask.

Variable explanations

Understand what each input and result means before calculating.

IPv4 address

A dotted-decimal address with four octets from 0 to 255, such as 192.168.1.10.

CIDR prefix length

The slash number that indicates how many bits belong to the network prefix, such as /24.

Subnet mask

The dotted-decimal mask that separates network bits from host bits.

Wildcard mask

The inverse of the subnet mask, commonly used in access control list matching.

Host bits

The number of bits available for addresses inside the subnet.

Block size

The total number of IPv4 addresses covered by the prefix.

Address type

A practical classification such as private, public, loopback, link-local, multicast, documentation, or reserved.

Reviewed by the Calculator.org.in Editorial Team

Formula behavior, validation cases, explanatory examples, and cited sources are checked before publication. This review supports educational accuracy and is not a substitute for qualified professional advice.

Last reviewed: 2026-08-03

Review process

Formula guide

See the calculation logic, variable definitions, and practical meaning.

Subnet mask

Mask = first N bits set to 1, remaining bits set to 0

  • N is the CIDR prefix length from 0 to 32.
  • A /24 mask is 255.255.255.0.

The prefix length tells how many bits identify the network portion of the address.

Network address

Network address = IP address AND subnet mask

  • The IP address is converted to a 32-bit number.
  • The subnet mask keeps the network bits and clears host bits.

The result is the first address in the subnet block.

Broadcast address

Broadcast address = network address OR wildcard mask

  • Wildcard mask is the inverse of the subnet mask.
  • Host bits are set to 1.

The result is the last address in the subnet block for ordinary IPv4 subnets.

Total addresses

Total addresses = 2^(32 - prefix length)

  • A shorter prefix leaves more host bits and more addresses.

For example, /24 leaves 8 host bits, so it contains 256 total addresses.

Usable hosts

Usable hosts = total addresses - 2

  • /31 and /32 are special cases.
  • Traditional subnets reserve network and broadcast addresses.

The calculator treats /31 as two usable point-to-point addresses and /32 as one host route.

Host bits

Host bits = 32 - prefix length

  • IPv4 addresses are 32 bits long.

Host bits determine the address block size and host capacity.

Wildcard mask

Wildcard mask = 255.255.255.255 - subnet mask

  • Wildcard masks are often used in Cisco-style ACLs and routing statements.

In a wildcard mask, 0 bits must match and 1 bits may vary.

Worked examples

Follow realistic inputs through the calculation step by step.

1

Worked example

Typical home subnet

  1. 1Enter 192.168.1.10 as the IPv4 address.
  2. 2Enter 24 as the CIDR prefix length.
  3. 3The network address is 192.168.1.0 and the broadcast address is 192.168.1.255.
2

Worked example

Firewall wildcard example

  1. 1Enter 192.168.1.10 and /24.
  2. 2The network is 192.168.1.0 and the wildcard mask is 0.0.0.255.
  3. 3A Cisco-style ACL match can use 192.168.1.0 0.0.0.255.
3

Worked example

Small /30 subnet

  1. 1Enter an IPv4 address in a /30 network.
  2. 2The total address count is 4.
  3. 3The common usable host count is 2.
4

Worked example

Point-to-point /31 subnet

  1. 1Enter a prefix length of 31.
  2. 2The calculator treats both addresses as usable for point-to-point style networks.
  3. 3Review your device and routing requirements before using /31.
5

Worked example

Single-host /32 route

  1. 1Enter a prefix length of 32.
  2. 2The network and broadcast values are the same address.
  3. 3The result represents a single IPv4 address.
6

Worked example

Prefix comparison

  1. 1Use the nearby prefix reference to compare /23, /24, and /25 style changes.
  2. 2A smaller slash number creates a larger address block.
  3. 3A larger slash number creates a smaller address block.
7

Worked example

Special address check

  1. 1Enter 203.0.113.9/32.
  2. 2The calculator identifies it as a documentation address.
  3. 3Use the address-scope note before assuming an address is routable on the public internet.

Common mistakes

Avoid these common input and interpretation errors.

Mixing subnet mask and IP address

A subnet mask such as 255.255.255.0 is not usually assigned as a host IP address.

Forgetting reserved addresses

Traditional IPv4 subnets reserve the network and broadcast addresses, reducing ordinary usable host count by two.

Assuming classful rules only

Modern IPv4 routing commonly uses CIDR, so the prefix length matters more than old class A, B, and C defaults.

Using IPv6 in an IPv4 field

This calculator is intentionally IPv4-only. Use the dedicated IPv6 Subnet Calculator for 128-bit prefixes, notation, scope, reverse DNS, and child-prefix planning.

Misreading wildcard masks

In wildcard masks, 0 means the bit must match and 1 means it can vary. This is the inverse of how subnet masks are usually explained.

Assuming documentation addresses are public test targets

Ranges such as 192.0.2.0/24, 198.51.100.0/24, and 203.0.113.0/24 are reserved for examples.

Forgetting /31 and /32 special cases

/31 networks are commonly used for point-to-point links, while /32 represents a single host route.

Changing production routing from calculator output alone

Subnet math should still be reviewed with routing, DHCP, NAT, firewall, and device configuration context.

Frequently asked questions

Quick answers to the questions users ask most often.

What does this subnet calculator calculate?
It calculates IPv4 network address, broadcast address, usable host range, subnet mask, wildcard mask, total addresses, and usable hosts from an IP address and CIDR prefix.
What is CIDR notation?
CIDR notation writes an address with a slash prefix, such as 192.168.1.10/24. The slash number tells how many bits are network bits.
What is a subnet mask?
A subnet mask separates the network portion of an IPv4 address from the host portion.
What is a wildcard mask?
A wildcard mask is the inverse of a subnet mask and is often used in access control lists.
What is the network address?
The network address is the first address in the subnet block and identifies the subnet itself.
What is the broadcast address?
The broadcast address is the last address in a traditional IPv4 subnet block.
Why are usable hosts sometimes total addresses minus two?
Traditional IPv4 subnets reserve the network address and broadcast address, leaving the rest for hosts.
What are host bits?
Host bits are the bits left after the network prefix. A /24 has 8 host bits because IPv4 has 32 total bits.
What is block size?
Block size is the total number of IPv4 addresses in the subnet, calculated as 2 raised to the number of host bits.
How do I use the wildcard ACL example?
Use it as a subnet math reference for Cisco-style matching, then confirm syntax and behavior on your actual network platform.
How are /31 networks handled?
The calculator treats /31 networks as two usable addresses, which is common for point-to-point links.
How are /32 networks handled?
A /32 represents a single IPv4 address, so network, broadcast, first usable, and last usable are the same.
Does this support IPv6?
This page focuses on IPv4. Use the dedicated IPv6 Subnet Calculator for IPv6 CIDR ranges and prefix planning.
Can I enter a dotted subnet mask instead of CIDR?
Not in this release. Enter the CIDR prefix length from 0 to 32.
What is a private IPv4 address?
Private IPv4 ranges include 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.
What is a carrier-grade NAT address?
Carrier-grade NAT commonly uses 100.64.0.0/10. These addresses are not ordinary public host addresses.
What are documentation IPv4 addresses?
192.0.2.0/24, 198.51.100.0/24, and 203.0.113.0/24 are reserved for examples and documentation.
Can I compare nearby subnet sizes?
Yes. The nearby prefix reference shows adjacent prefixes plus common /24, /30, /31, and /32 values.
Can this replace network engineering review?
No. It helps check subnet math, but production network changes should be reviewed and tested by qualified administrators.
Does this calculator send IP data to a server?
No calculator-specific server submission is required. The calculation runs through the site calculator engine.
Are formulas calculated in the page component?
No. The page renders a registered calculator specification and the Formula Engine performs the subnet calculation.

Version history

A transparent record of calculator content updates.

Updated 2026-08-03
  • 1.1.0 · 2026-08-03

    Added host bits, block size, subnet math, wildcard ACL example, prefix reference, special address notes, and expanded subnetting guidance.

  • 1.0.0 · 2026-07-05

    Initial IPv4 CIDR subnet calculator release.