AllKit

IPv4 Subnet Calculator — CIDR, Netmask & IP Range

100% freeRuns in your browserNo sign-up
live

Prefix is optional — without it, /24 is assumed. Try 10.0.0.55/22 or 172.16.5.9/28.

Network address
192.168.1.128
Broadcast address
192.168.1.191
Subnet mask
255.255.255.192
Wildcard mask
0.0.0.63
First usable host
192.168.1.129
Last usable host
192.168.1.190
Usable hosts
62
Total addresses
64
CIDR
/26
IP class
C
Scope
Private (RFC 1918)
Host bits
6

Binary view

Address11000000.10101000.00000001.10000010192.168.1.130
Netmask11111111.11111111.11111111.11000000255.255.255.192
Network11000000.10101000.00000001.10000000192.168.1.128

Highlighted bits are the network portion (26 bits); dimmed bits are the host portion.

About the Subnet Calculator

Subnet Calculator turns an address like 192.168.1.130/26 into everything you actually need: the network address, broadcast address, subnet mask and wildcard mask, the first and last usable host, and how many hosts the subnet holds. The binary view of the address and mask makes it easy to see why the ranges fall where they do.

It is the fastest way to answer everyday questions: “Is this IP inside that subnet?”, “What mask do I need for 60 hosts?” or “What range does the router DHCP hand out?”. The calculator runs entirely in your browser — nothing is sent anywhere.

How to use the Subnet Calculator

  1. Type an IP address with its prefix, for example 10.0.0.55/22 or 192.168.1.130/26.
  2. Press Calculate (or Enter) — every property of the subnet appears instantly.
  3. Use the CIDR reference table below to pick a prefix size for a required number of hosts.

How IPv4 subnetting works

An IPv4 address is 32 bits. The prefix length /n says how many leading bits are fixed as the network portion.

Network address = IP AND netmask        (all host bits set to 0)
Broadcast address = IP OR wildcard      (all host bits set to 1)
First host = network + 1 (for /1–/30)   Last host = broadcast − 1
Usable hosts = 2^(32−n) − 2             (the −2 exclude network & broadcast)

Example 192.168.1.130/26:
netmask 255.255.255.192 → block size 64 → subnets at .0, .64, .128, .192
.130 falls into the .128 block → network 192.168.1.128, broadcast .191
usable hosts 192.168.1.129 – 192.168.1.190 (62 hosts)

Frequently asked questions

What does /24 mean?

It is CIDR notation for the prefix length: 24 of the 32 bits are the network part, giving the mask 255.255.255.0 and 254 usable host addresses (2^8 − 2).

Why are two addresses subtracted from every subnet?

The first address of a subnet (all host bits 0) identifies the network itself, and the last (all host bits 1) is the broadcast address. Neither can be assigned to a device, except in /31 point-to-point and /32 host routes.

Which prefix fits 100 hosts?

You need 100 + 2 = 102 addresses → 2^7 = 128 → a /25 (mask 255.255.255.128, 126 usable hosts). The CIDR table in the reference section lists host counts for every prefix.

Does this work with IPv6?

This calculator covers IPv4. IPv6 subnets are almost always /64 per LAN, and the arithmetic is simpler: the host portion is the entire lower 64 bits.

Related tools