This tool is also a REST API. Automate it in your app — free tier, no card. Get a free key Docs

Subnet Calculator

Calculate subnets, IP ranges, CIDR notation, and network details

Quick select: /8 Class A /16 Class B /24 Class C /26 64 IPs /28 16 IPs /30 P2P

Enter an IP address and click Calculate

Or select a quick preset above

What is Subnet Calculator?

Subnet Calculator is a free online tool for network administrators and engineers to calculate IP subnet details. Enter an IP address with CIDR notation or subnet mask to get network address, broadcast address, usable host range, and total number of hosts. Essential for network planning and IP address management.

Our calculator supports IPv4 subnetting and provides detailed breakdowns of network classes, wildcard masks, and binary representations for educational purposes.

Key Features

CIDR Notation

Calculate subnets using CIDR notation (/24, /16, etc.) or traditional subnet masks.

Host Range

Get the first and last usable IP addresses in any subnet instantly.

Binary View

See binary representations to understand how subnetting works.

Network Planning

Plan network segmentation with accurate host counts and address ranges.

Frequently Asked Questions

CIDR (Classless Inter-Domain Routing) notation represents IP addresses with their subnet mask as a suffix. For example, 192.168.1.0/24 means the first 24 bits are the network portion, leaving 8 bits for hosts (254 usable addresses).

A /24 network has 256 total addresses (2^8), but only 254 are usable for hosts. The network address and broadcast address are reserved, leaving 254 addresses for devices.

A subnet mask divides an IP address into network and host portions. Common masks include 255.255.255.0 (/24) for 254 hosts and 255.255.0.0 (/16) for 65,534 hosts.

Developer API

Need this in your own app? Automate it with the API.

Everything this tool does, available as a simple REST endpoint with JSON responses — perfect for scripts, monitoring and integrations. Free tier: 100 requests/month, no card required.

terminal
curl -H "X-API-Key: tn_your_api_key" \
  "https://tools-ninja.com/api/v1/subnet?ip=192.168.1.0&cidr=24"
Found this useful? Share it