---
title: Free IP Subnet Calculator | CIDR, Netmask, Wildcard | TestingBot
description: Free online IP subnet calculator. Calculate network address, broadcast
  address, usable host range and wildcard mask from any IPv4 address and CIDR notation.
source_url:
  html: https://testingbot.com/free-online-tools/ip-subnet-calculator
  md: https://testingbot.com/free-online-tools/ip-subnet-calculator.md
---

[Tools](https://testingbot.com/free-online-tools)Network Tools

# IP Subnet Calculator

Calculate subnets, CIDR, netmasks and host ranges

Enter an IPv4 address with a subnet mask or CIDR prefix to instantly calculate the network address, broadcast address, usable host range, wildcard mask and more. Supports all subnet sizes from /0 to /32.

## IP Subnet Calculator

IP Address 

Subnet Mask / CIDR 

 Calculate 

 Show all subnets in this network 

| Network Address | Usable Range | Broadcast |
| --- | --- | --- |

### CIDR / Subnet Reference Table

| CIDR | Subnet Mask | Wildcard Mask | Total Addresses | Usable Hosts |
| --- | --- | --- | --- | --- |

## What is an IP Subnet Calculator?

An IP subnet calculator is a tool that takes an IPv4 address and a subnet mask (or CIDR prefix length) and computes key network properties: the network address, broadcast address, usable host range, wildcard mask, and number of available hosts. It is essential for network engineers, system administrators, and developers who need to plan IP addressing schemes, configure firewalls, or set up routing tables.

## What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation is a compact way to represent an IP address and its associated subnet mask. It is written as `IP/prefix`, for example `192.168.1.0/24`. The number after the slash indicates how many leading bits of the address are used for the network portion. A /24 means the first 24 bits are the network part, leaving 8 bits (256 addresses) for hosts. CIDR replaced the older classful addressing system (Class A, B, C) and allows for more flexible allocation of IP address space.

## What is the difference between a subnet mask and a wildcard mask?

A subnet mask and a wildcard mask are inverses of each other. The subnet mask has 1-bits for the network portion and 0-bits for the host portion (e.g. `255.255.255.0` for a /24). The wildcard mask flips this: 0-bits for the network and 1-bits for the host portion (e.g. `0.0.0.255`). Wildcard masks are commonly used in Cisco ACLs (Access Control Lists) and OSPF routing configurations, while subnet masks are used in most other networking contexts.

## How do I calculate the number of usable hosts in a subnet?

The formula is `2^(32 - prefix) - 2` for subnets with a prefix of /30 or less. The two addresses subtracted are the network address (first address) and the broadcast address (last address), which cannot be assigned to hosts. For a /31, RFC 3021 allows both addresses to be used as a point-to-point link (2 usable). A /32 is a single host address (1 usable). For example, a /24 subnet has 2^8 - 2 = 254 usable host addresses.

## What are the common subnet sizes?

The most commonly used subnet sizes are:

- **/8** (255.0.0.0) — 16,777,214 hosts — large enterprise or ISP networks
- **/16** (255.255.0.0) — 65,534 hosts — medium to large networks
- **/24** (255.255.255.0) — 254 hosts — the most common LAN subnet
- **/25** (255.255.255.128) — 126 hosts — splitting a /24 in half
- **/26** (255.255.255.192) — 62 hosts — smaller office networks
- **/27** (255.255.255.224) — 30 hosts — small workgroups
- **/28** (255.255.255.240) — 14 hosts — very small segments
- **/30** (255.255.255.252) — 2 hosts — point-to-point links
- **/32** (255.255.255.255) — 1 host — single host route

## How is subnet calculation used in testing?

When testing network-dependent applications, you often need to configure test environments with specific subnet settings. A subnet calculator helps you quickly determine the correct network addresses, gateway IPs, and host ranges for test VMs, containers, or cloud instances. It is also useful when writing automated tests that validate firewall rules, ACLs, or IP whitelisting logic — you can verify which IPs fall within a given subnet range.

### All Tools

#### Accessibility

- [Color Contrast Checker](https://testingbot.com/free-online-tools/color-contrast-checker)

#### Calculator

- [Test Effort Estimator](https://testingbot.com/free-online-tools/test-effort-estimator)
- [Test Coverage Calculator](https://testingbot.com/free-online-tools/test-coverage-calculator)

#### Converter

- [Unix Timestamp Converter](https://testingbot.com/free-online-tools/unix-timestamp-converter)

#### Formatter

- [Puppeteer to Playwright Converter](https://testingbot.com/free-online-tools/puppeteer-to-playwright-converter)
- [JSON Prettifier](https://testingbot.com/free-online-tools/json-prettify)
- [HTML Escaper](https://testingbot.com/free-online-tools/html-escape)
- [XML Prettifier](https://testingbot.com/free-online-tools/xml-prettify)
- [Remove Whitespace](https://testingbot.com/free-online-tools/remove-all-whitespace)
- [Text to One Line](https://testingbot.com/free-online-tools/text-to-one-line)
- [PX to REM Converter](https://testingbot.com/free-online-tools/px-to-rem-converter)
- [CSS Prettifier](https://testingbot.com/free-online-tools/css-prettify)

#### Generator

- [Random Avatar Generator](https://testingbot.com/free-online-tools/free-avatar-generator)
- [Placeholder Image Generator](https://testingbot.com/free-online-tools/placeholder-image-generator)
- [Random Address Generator](https://testingbot.com/free-online-tools/random-address-generator)
- [Credit Card Generator](https://testingbot.com/free-online-tools/credit-card-number-generator)
- [Random Number Generator](https://testingbot.com/free-online-tools/random-number-generator)
- [JWT Parser](https://testingbot.com/free-online-tools/jwt-parser)
- [Fake Person Generator](https://testingbot.com/free-online-tools/fake-person-generator)
- [Hash Text](https://testingbot.com/free-online-tools/hash-text)
- [Lorem Ipsum Generator](https://testingbot.com/free-online-tools/lorem-ipsum-generator)
- [Random IP Generator](https://testingbot.com/free-online-tools/random-ip-generator)
- [Random GUID Generator](https://testingbot.com/free-online-tools/random-guid-generator)
- [Character Count](https://testingbot.com/free-online-tools/character-count)
- [ASCII to Binary](https://testingbot.com/free-online-tools/ascii-to-binary)
- [Random Color Generator](https://testingbot.com/free-online-tools/random-color-generator)
- [Open Graph Meta Generator](https://testingbot.com/free-online-tools/og-meta-generator)
- [QR Code Generator](https://testingbot.com/free-online-tools/qr-code-generator)
- [Device Information](https://testingbot.com/free-online-tools/device-information)
- [User Agent Parser](https://testingbot.com/free-online-tools/user-agent-parser)
- [Image Extractor](https://testingbot.com/free-online-tools/image-extractor)
- [Test Plan Generator](https://testingbot.com/free-online-tools/test-plan-generator)

#### Network

- [CORS Tester](https://testingbot.com/free-online-tools/cors-tester)
- [My GPS Location](https://testingbot.com/free-online-tools/my-gps-location)
- [What's My IP Address](https://testingbot.com/free-online-tools/whats-my-ip-address)

#### Scheduler

- [Cron Expression Generator](https://testingbot.com/free-online-tools/cron-expression-generator)

#### Speed

- [Critical CSS Generator](https://testingbot.com/free-online-tools/critical-css-generator)

#### Testing

- [XPath & CSS Selector Tester](https://testingbot.com/free-online-tools/xpath-css-selector-tester)

[View all tools](https://testingbot.com/free-online-tools)
