You don't have javascript enabled. Please enable javascript to use this website.

Subnet Calculator

IPv4 subnet mask and CIDR calculator: results, binary view, splitting and VLSM.

Also accepts 192.168.1.10 255.255.255.0. Need IPv6? IPv6 subnet calculator.

24 network bits · 8 host bitsClick a bit to move the prefix

Result

192.168.1.0/24 is a private network with 254 usable addresses, from 192.168.1.1 to 192.168.1.254.

192.168.1.0/24 Private (RFC 1918)Class C
Usable hosts254
Usable range192.168.1.1 – 192.168.1.254
Broadcast192.168.1.255
Subnet mask255.255.255.0
FieldValue
Network address192.168.1.0
First usable192.168.1.1
Last usable192.168.1.254
Broadcast192.168.1.255
Subnet mask255.255.255.0
Wildcard mask0.0.0.255
Total addresses256
Reverse DNS zone1.168.192.in-addr.arpa

Runs in your browser: nothing is sent to our server.

Split 192.168.1.0/24 into equal subnets

subnets

VLSM: subnets of different sizes in 192.168.1.0/24

IP range to CIDR

to

CIDR to range: type the block in the main box above (e.g. 10.0.0.0/23).

Is an IP address in this network?

A subnet calculator turns an IP address and a mask (like /24 or 255.255.255.0) into the network address, broadcast address, range of usable host addresses and number of hosts. Type an address above, or click a row in the CIDR table below.

What Do the Results Mean?

The network address names the subnet, the broadcast address reaches every device in it, and the usable range is what you can give to devices.

New to masks and prefixes? What a subnet mask is explains 255.255.255.0, /24 and the bit-by-bit math.

FieldMeaningExample (192.168.1.10/24)
Network addressFirst address: names the subnet, not given to a device192.168.1.0
Usable rangeAddresses you can give to devices192.168.1.1 – 192.168.1.254
BroadcastLast address: a packet sent to it reaches every device in the subnet192.168.1.255
Subnet maskThe prefix written as four numbers255.255.255.0
Wildcard maskInverse of the mask, for router access lists and OSPF0.0.0.255
Reverse DNS zoneWhere PTR records for the network live (for /8, /16, /24)1.168.192.in-addr.arpa

CIDR Cheat Sheet: Every Prefix From /8 to /32

A /24 has 256 addresses and 254 usable hosts; each extra bit halves the size. Click a row to load it in the calculator.

PrefixSubnet maskWildcardAddressesUsable hostsTypical use
255.0.0.00.255.255.25516,777,21616,777,214Old class A size; 10.0.0.0/8 private range
255.128.0.00.127.255.2558,388,6088,388,606
255.192.0.00.63.255.2554,194,3044,194,302
255.224.0.00.31.255.2552,097,1522,097,150
255.240.0.00.15.255.2551,048,5761,048,574172.16.0.0/12 private range
255.248.0.00.7.255.255524,288524,286
255.252.0.00.3.255.255262,144262,142
255.254.0.00.1.255.255131,072131,070
255.255.0.00.0.255.25565,53665,534Old class B size; 192.168.0.0/16 private range
255.255.128.00.0.127.25532,76832,766
255.255.192.00.0.63.25516,38416,382
255.255.224.00.0.31.2558,1928,190
255.255.240.00.0.15.2554,0964,094
255.255.248.00.0.7.2552,0482,046
255.255.252.00.0.3.2551,0241,0224 × /24: a large office or campus segment
255.255.254.00.0.1.2555125102 × /24
255.255.255.00.0.0.255256254Old class C size; the usual home and office network
255.255.255.1280.0.0.127128126Half a /24
255.255.255.1920.0.0.636462Quarter of a /24
255.255.255.2240.0.0.313230Small office or VLAN
255.255.255.2400.0.0.151614Small VLAN, DMZ or cloud subnet
255.255.255.2480.0.0.786Small block of static IPs from a provider
255.255.255.2520.0.0.342Point-to-point link (classic)
255.255.255.2540.0.0.122Point-to-point link (RFC 3021)
255.255.255.2550.0.0.011One address: host route, loopback, firewall rule
Chart of CIDR prefix sizes: /8 16,777,216 addresses, /16 65,536, /24 256, /26 64, /30 4, /31 2 and /32 1
Each extra bit after the slash halves the block.

What a /24, /27, /29 or /30 is used for, with every mask in binary: the subnet mask cheat sheet.

How to Split a Network Into Subnets

Choose how many subnets you need, or how many hosts each needs; the calculator finds the right prefix.

A /24 network split into four equal /26 subnets, and split by VLSM into a /25, a /26 and a /27 for 100, 50 and 20 hosts.

Equal subnets: 192.168.10.0/24 into 4 → each gets 2 more network bits → four /26 (192.168.10.0, .64, .128, .192) with 62 hosts each. Use the Split box above.

VLSM (variable length): when needs differ, give each subnet only what it needs, largest first. 100 + 50 + 20 hosts in 192.168.10.0/24 → a /25 (126 hosts) at .0, a /26 (62) at .128 and a /27 (30) at .192, leaving .224 to .255 free. The VLSM box does it, checks it fits, and lists what's left.

Convert an IP Range to CIDR (and Back)

Enter a start and end address to get the smallest list of CIDR blocks that covers exactly that range.

Example: 10.0.0.0 to 10.0.2.255 is 768 addresses, which is 10.0.0.0/23 + 10.0.2.0/24. A range that doesn't start on a block boundary needs more blocks: 192.168.1.5 to 192.168.1.10 is .5/32, .6/31, .8/31 and .10/32. To go the other way, type a CIDR block in the main box. The same converter also has its own page: IP range to CIDR.

How This Calculator Works

Where it runsIn your browser; nothing is sent to our server
AcceptsIPv4 with /prefix or dotted mask (/0 to /32)
OutputsNetwork, broadcast, usable range, hosts, mask, wildcard, binary, integer, type, class, reverse DNS zone, a one-line summary
ExtrasSplit by count or hosts, VLSM, IP range to CIDR, IP-in-network check, shareable link (?ip=192.168.1.10&p=26)
/31 and /32Handled per RFC 3021 (2 and 1 usable addresses)
TestedThe math is covered by automated tests (masks, ranges, /31, /32, VLSM, range to CIDR)

How to Use the IPv4 Subnet Calculator

Type or paste an IPv4 address, for example 192.168.1.10. You can paste it with its prefix (192.168.1.10/24) or its subnet mask (192.168.1.10 255.255.255.0); results update as you type.

1

Select a CIDR Prefix

Choose a prefix from /0 to /32 in the list (each option shows the mask and the number of hosts), drag the slider, or click a bit in the bit strip.
2

Split the Network or Check an IP

Split the network into a number of subnets, or into subnets with enough hosts each, and copy the plan as a table. Paste any IP to check whether it belongs to the network.
3

Read the Results Table

Review network address, broadcast address, subnet mask, wildcard mask, total hosts, and usable host range in the results table. All values update in real time — no page reload required.
4

Interpret /31 and /32 Prefixes

A /31 prefix returns 2 usable addresses with no broadcast address — correct per RFC 3021 for point-to-point links. A /32 is a single-host route where the network address and host address are identical.

Frequently Asked Questions

How many usable hosts are in a /24?
254. A /24 has 256 addresses; the first is the network address and the last is the broadcast address, so they can't be given to devices.
What is the subnet mask for /24?
255.255.255.0. For /25 it's 255.255.255.128, for /26 255.255.255.192, for /27 255.255.255.224: see the CIDR table on this page for every prefix.
What is the difference between a subnet mask and a CIDR prefix?
They say the same thing two ways: /24 means the first 24 bits are the network, which is written 255.255.255.0 as a mask. Routers, firewalls and cloud consoles mostly use the /prefix form.
How do I calculate a subnet mask?
Count the addresses you need (hosts + 2), round up to a power of two, and subtract that power from 32: 50 hosts need 64 addresses (2⁶), so the prefix is /26 (255.255.255.192). The Split and VLSM boxes do it for you.
What is a wildcard mask?
The inverse of the subnet mask (255.255.255.255 minus the mask), used in router access lists and OSPF: /24 gives 0.0.0.255, /26 gives 0.0.0.63.
Why does a /31 have 2 usable addresses?
RFC 3021 allows /31 on point-to-point links, where no network or broadcast address is needed, so both addresses are usable. The calculator follows it: /31 = 2 usable, /32 = 1.

Next steps

Related Tools

IPv6 Subnet Calculator
Prefixes, ranges and splits for IPv6.
IP CIDR Checker
Check a list of IPs against CIDR blocks.
Public / Private IP Checker
Is an address private, public or reserved?
IP Class Checker
The class (A to E) of an IPv4 address.
IP Range to CIDR Converter
Many ranges at once, IPv4 and IPv6.
IP to Decimal
An IP address as a single number, and back.

Related Guides

Guide What Is a Subnet Mask?
255.255.255.0, /24 and the cheat sheet, explained.
Guide Public vs Private IP
The private ranges you can subnet freely.
Guide What Is IPv4?
The 32-bit address format behind every subnet.