CIDR and Subnet Calculator

Type an IPv4 address with a prefix such as /24 to get the network, mask, broadcast, first and last usable address and address count, and check whether an IP is in range.

Calculate a range
192.168.1.0/24255.255.255.0254 hosts

Calculator

Common prefixes

PrefixMaskAddressesExample
/32255.255.255.2551A single server
/30255.255.255.2524Point-to-point link
/29255.255.255.2488A small IP block
/24255.255.255.0256An office or home network
/16255.255.0.065,536A large network

When you need it

Firewalls

Allow a whole range of addresses into SSH or the database at once.

Server IPs

Know the bounds of an extra IP block on a VPS.

Cloud services

Such as Cloudflare, which publishes its addresses in CIDR for allow-lists.

Example: allow only your office

If your office ISP gives you a range like 203.0.113.0/29, add it to the server firewall allow-list for SSH or phpMyAdmin, so access from outside the office is refused. The calculator shows the eight addresses that range covers.

Key terms

Short definitions of what you meet along the way.

CIDR
Writing a network as an address and prefix such as 10.0.0.0/8.
Netmask
Defines which part of the address is the network and which the hosts.
Private ranges
The 10/8, 172.16/12 and 192.168/16 ranges for internal networks only.

Frequently asked questions

Did not find your answer? Ask us on WhatsApp

/24 vs 255.255.255.0?

The same mask written two ways; /24 means the first 24 bits are the network.

Why are usable hosts two fewer?

The first address is the network and the last the broadcast in most networks, except /31 and /32.

Does it support IPv6?

This calculator is for IPv4. Find your current IP with the What is my IP tool.

Need a server for your project?

VPS servers with full root access.

Contact us on WhatsApp