Subnet Calculator - IP and CIDR

This online subnet calculator is the perfect tool for anyone to size and scale their IPv4 networks.

IP address or CIDR block

local_cafe  Free and ad-free. Saved you time? Help keep it running. Buy me a coffee About the project
Download the free subnet chart PDF to use as a printable reference.

Frequently asked questions

How do I calculate a subnet from an IP address and CIDR prefix?

Enter an IP address with a prefix length, for example 192.168.1.0/24. The calculator returns the subnet mask, wildcard mask, network and broadcast addresses, the first and last usable host and the number of usable hosts.

How many usable hosts are in a subnet?

A subnet with n host bits holds 2^n addresses. Two of them, the network and broadcast addresses, are reserved, so a /24 has 254 usable hosts and a /30 has 2.

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

The wildcard mask is the inverse of the subnet mask. A /24 subnet mask is 255.255.255.0 and its wildcard mask is 0.0.0.255. Wildcard masks are used in access lists and routing protocol configuration.

Is there a free subnet calculator API?

Yes. NetworkCalc provides a free public REST API for subnet calculations that needs no authentication. See the Subnet Calculator API documentation for endpoints and examples.

Subnet mask reference

Pick a prefix length to see its mask, wildcard, host count and example ranges, or open the full CIDR chart.

/8 /9 /10 /11 /12 /13 /14 /15 /16 /17 /18 /19 /20 /21 /22 /23 /24 /25 /26 /27 /28 /29 /30 /31 /32

Popular networks

10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 100.64.0.0/10 127.0.0.0/8 169.254.0.0/16 10.0.0.0/16 10.1.0.0/16 10.10.0.0/16 172.16.0.0/16 192.168.0.0/24 192.168.1.0/24

More Tools

About the Online Subnet Calculator

Subnetting

Network administrators have been using subnetting for decades to make their networks manageable. Subnets allow you to break large networks into smaller subnets, which are logically separated. If something goes wrong in one part of the network, it does not affect other segments.

The design of IP addressing means every time you add a bit to your subnet mask, you divide the subnet in two parts and assign separate networks. This allows you to build and maintain scalable and efficient networks.

Network Calculator and Free API

This online subnet calculator is the perfect tool to help you figure out out what a network address will be or calculate subnets with masks. This online calculator helps you determine whether a network has enough hosts. also provides an easy way of translating between CIDR notation and dotted-decimal format if needed.

Enter your subnet to get the subnet mask, wildcard mask, network/broadcast address, and number of assignable hosts. You can edit the results and save them on an IP address table and print them for reference.

Use the free subnet API to calculate subnets from a terminal or integrate with software. Save a subnet to your NetworkCalc account to manage IP address assignments.

We designed these tools for systems administrators, network engineers, IT specialists, and students. We hope you find them valuable!