Routerpedia

Network tool

Subnet Calculator

Free IPv4 subnet calculator. Enter an IP and CIDR prefix to get network address, broadcast, usable hosts, and subnet mask.

Enter IP address and CIDR

Examples: 10.0.0.0/8 · 172.16.0.0/16 · 192.168.1.0/24

How to use this CIDR subnet calculator

Enter an IPv4 address and CIDR prefix such as 192.168.1.0/24. The calculator returns the network address, broadcast address, subnet mask, wildcard mask, first and last usable hosts, and host counts. That is the core math behind home LAN design, VLAN segments, and static IP planning on consumer routers.

A /24 network (mask 255.255.255.0) is the default on most retail routers and offers 254 usable hosts — plenty for phones, laptops, and IoT. A /16 is enormous for homes; a /28 or /29 suits tiny guest or lab slices. Use this tool before you change LAN IP ranges so printers and reservations still fall inside the DHCP pool you configure.

CIDR, masks, and why routers ask for both

CIDR notation combines an IP with a prefix length. The prefix tells devices how many leading bits identify the network. The dotted subnet mask is the same idea in an older format. Wildcard masks (inverted masks) appear in some firewall ACLs. When two devices should talk without routing, they must share the same network number after applying the mask — our results make that visible without spreadsheet bit math.

Changing a router from 192.168.1.0/24 to 192.168.0.0/24 (or 10.0.0.0/24) is common when avoiding conflicts with a work VPN that also uses 192.168.1.0/24. Calculate the new range first, then update LAN IP, DHCP start/end, and any static devices. Find your current device address with What is my local IP?.

Practical home and lab examples

Example: main LAN 192.168.1.0/24, guest Wi‑Fi 192.168.10.0/24, and cameras on 192.168.20.0/24 if your router or firewall supports multiple interfaces or VLANs. Each segment gets its own DHCP scope and firewall rules. For a handful of static servers, a /28 might be enough; always leave room for growth.

When documenting port forwards, record the LAN IP and confirm it sits inside the calculated usable range. Combine with public IP checks for WAN testing and DNS Lookup if a hostname should point at that WAN address.

Subnet mask notation in dotted decimal

CIDR prefix length and dotted subnet masks express the same boundary. A /24 equals mask 255.255.255.0 — the first three octets identify the network, the last octet hosts devices. A /16 mask 255.255.0.0 spans 65,536 addresses, enormous for typical homes. Smaller prefixes like /28 (255.255.255.240) leave only fourteen usable hosts — fine for a tiny lab VLAN if you calculate carefully.

Router firmware may ask for mask instead of CIDR when you configure static routes or secondary LANs. Enter the calculator’s mask field directly rather than guessing. Wildcard masks invert the subnet mask for ACL syntax on advanced gear — our results show both so you can copy into Cisco-style rules or firewall objects without manual bit flipping.

Sizing DHCP pools inside a subnet

Usable hosts exclude network and broadcast addresses on standard subnets. On 192.168.1.0/24, hosts typically run from 192.168.1.1 (router) through 192.168.1.254. Reserve the bottom or top of the range for printers, NAS units, and servers with DHCP reservations, and let phones fill the middle dynamically. Never let the DHCP pool include addresses you assigned statically elsewhere — duplicates take devices offline unpredictably.

IoT-heavy homes exhaust small pools faster than expected — security cameras, speakers, and bulbs each need an address. If you approach capacity, move to a larger prefix or segment IoT onto another VLAN with its own scope. Confirm device addresses with What is my local IP? after changes, and verify WAN-side services separately on What is my IP?.

VLANs, guest Wi‑Fi, and overlap avoidance

Segmentation separates trusted laptops from guest phones or untrusted cameras. Each VLAN gets its own subnet — for example main LAN 192.168.1.0/24, guest 192.168.50.0/24, IoT 192.168.60.0/24. Calculate each range here before typing numbers into Omada, UniFi, or ISP mesh apps. Overlapping subnets between site-to-site VPNs and your home LAN break routing silently — pick non-colliding CIDR blocks before connecting to corporate networks.

Guest isolation should block east-west traffic while allowing internet access. Confirm firewall rules reference the correct mask and gateway per VLAN. Share guest credentials using the Wi‑Fi QR Code Generator after you finalize SSIDs. Strong passphrases from the WiFi Password Generator belong on every SSID, not just the primary one.

Subnet math for VPNs and remote access

WireGuard, OpenVPN, and IPSec tunnels often assign clients addresses from dedicated pools such as 10.8.0.0/24. Those pools must not overlap the LAN you are trying to reach remotely. If your home LAN and VPN pool both use 192.168.1.0/24, remote users cannot route to local printers without painful NAT tricks. Re-number the LAN using this calculator first — many guides suggest moving to 192.168.10.0/24 or 10.0.0.0/24 for that reason.

After renumbering, update DHCP reservations, port forwards, and static routes on printers. Validate DNS with DNS Lookup if internal hostnames fail over VPN. Check whether outbound traffic hairpins through a proxy or VPN using What is my proxy? while testing remote desktop sessions from cellular data.

Quick reference: common home CIDR choices

Retail routers ship with predictable defaults because they “just work” for most households. A /24 on 192.168.1.0 or 192.168.0.0 gives you room for roughly 250 clients — ample for phones, laptops, and smart bulbs. Moving to 10.0.0.0/24 is common on mesh kits and avoids some VPN collisions with 192.168.1.0/24 corporate networks. Only shrink to /28 or smaller when you deliberately want a tiny, isolated segment with a handful of static devices.

Before you click Save on a LAN redesign, run the new CIDR here, write down first/last usable hosts, and adjust DHCP start/end to match. Power-cycle one test laptop afterward and confirm it received an address inside the range using What is my local IP?. If anything falls outside the calculated bounds, fix reservations before users notice intermittent disconnects during lease renewals.

Common mistakes

Setting a static host IP outside the subnet, overlapping DHCP pools with another router in AP mode, or using /31 and /32 without understanding point-to-point special cases can break connectivity. Avoid giving two devices the same address. When cloning a network for a lab, pick a non-overlapping CIDR so VPN routes remain unambiguous.

Explore more free utilities on the Routerpedia tools page — Wi‑Fi security generators, ISP lookup, and proxy checks round out a complete home-network toolkit. Default gateway references for major brands live in our IP addresses section when you apply new LAN schemes. Save a screenshot of calculator results when opening support tickets about DHCP or static IP conflicts — support agents can verify your math quickly.