Network planning toolkit

IP Address, Subnet Mask and Default Gateway Calculator

Analyze subnets, validate gateways, compare networks, plan VLSM ranges, and inspect IPv6 prefixes. Export complete results for practical network documentation.

Choose a calculation mode

Use simple subnet analysis or open an advanced planning tool.

Enter any host address inside the subnet.
Both prefix and dotted-decimal formats work.
The tool validates it. It cannot discover a router automatically.
Use one line per subnet. Separate the name and host count with a comma.
Its meaning changes with the selected operation.
Adjacent sibling routes are merged exactly. A smallest covering supernet is also reported.

What this calculator can determine

This calculator converts an IPv4 address and subnet mask into a complete subnet profile. It finds the network address, broadcast address, usable host range, wildcard mask, CIDR block, address capacity, binary values, hexadecimal form, class information, and reverse DNS guidance. It also checks whether an entered default gateway belongs to the same subnet.

Advanced modes compare overlapping networks, split a large network into equal blocks, and create variable-length subnet plans. The IPv6 mode expands compressed addresses, calculates prefix boundaries, identifies common address types, and shows the first and last address in the selected prefix.

Formula used for IPv4 subnet calculations

Network address = IP address AND subnet mask Wildcard mask = 255.255.255.255 − subnet mask Broadcast address = network address OR wildcard mask Total addresses = 2^(32 − prefix length) Usable hosts = 2^(host bits) − 2 for ordinary /0 through /30 subnets /31 usable addresses = 2 for point-to-point links /32 usable addresses = 1 for a host route

The bitwise AND operation preserves bits that are set in both the address and mask. Host bits become zero in the network address. The wildcard mask sets every host bit to one. Applying it to the network produces the broadcast address.

How to use this calculator

Analyze one IPv4 subnet

Choose the IPv4 subnet and gateway mode. Enter an IPv4 address. Add either a CIDR prefix or a dotted subnet mask. The gateway field is optional. Choose a gateway suggestion rule, then calculate. The gateway result explains whether the entered address is inside the usable range.

Compare two networks

Enter two CIDR blocks. The comparison reports whether they overlap, match, or contain one another. An optional test IP can be checked against both ranges. This mode is useful when reviewing route tables, firewall objects, cloud networks, or migration plans.

Split a network

Enter a base CIDR and a longer target prefix. The calculator generates equal-size child networks. Every row includes the mask, first host, last host, broadcast address, and usable capacity. Very large splits are limited on screen to protect browser performance.

Create a VLSM plan

Enter a base network. Add one department or purpose per line. Follow each name with a comma and required host count. The planner sorts the largest requirement first. It assigns the smallest suitable subnet, suggests a gateway, and reports unused addresses.

Analyze an IPv6 prefix

Enter a valid IPv6 address and prefix length. The result shows compressed and expanded notation, prefix boundaries, address type, interface bits, and child prefixes. IPv6 has no broadcast address. Multicast performs functions that broadcast commonly served in IPv4.

Default gateway validation

A default gateway is normally a router interface in the local subnet. This calculator can validate a known gateway or suggest a common address. It cannot discover the configured router from only an IP address and mask. Networks may use the first host, last host, a virtual address, or another convention.

An ordinary gateway should not equal the subnet network address or broadcast address. It must fall inside the assignable host range. A /31 point-to-point network follows different rules. A /32 route represents one host and normally does not describe a shared LAN gateway.

CIDR, masks, and host capacity

Common IPv4 prefixes

CIDRMaskUsable hosts
/8255.0.0.016,777,214
/16255.255.0.065,534
/20255.255.240.04,094
/22255.255.252.01,022
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522
/31255.255.255.2542
/32255.255.255.2551

Private IPv4 ranges

RangeTypical use
10.0.0.0/8Large private networks
172.16.0.0/12Medium private networks
192.168.0.0/16Home and small office LANs
169.254.0.0/16Automatic link-local addressing
100.64.0.0/10Carrier-grade NAT

Binary calculation example

Consider IP address 192.168.1.25 with mask 255.255.255.0. The first 24 bits identify the network. The final eight bits identify a host. A bitwise AND produces 192.168.1.0. Setting every host bit to one produces 192.168.1.255. The usable range is normally 192.168.1.1 through 192.168.1.254.

IP: 11000000.10101000.00000001.00011001 Mask: 11111111.11111111.11111111.00000000 Network: 11000000.10101000.00000001.00000000 Broadcast: 11000000.10101000.00000001.11111111

Route aggregation and conversion utilities

The conversion mode translates CIDR prefixes, subnet masks, wildcard masks, numeric IPv4 values, hexadecimal values, and binary values. Host sizing finds the smallest practical subnet for a requested capacity. Subnet sizing determines how many network bits must be borrowed from a base block.

Route summarization removes covered routes and repeatedly combines exact sibling networks. It also reports the smallest single covering supernet. That single supernet can include extra addresses when the input routes are not perfectly aligned, so review the warning before advertising it.

Planning DHCP ranges

The DHCP suggestion leaves a small static range at the beginning when space permits. It also tries to avoid the entered or suggested gateway. This is only a planning aid. Real deployments may reserve addresses for routers, switches, access points, servers, printers, controllers, and monitoring systems.

Frequently asked questions

Can the calculator find my real default gateway?

No. It can validate or suggest an address. The actual gateway comes from device configuration, DHCP, routing policy, or network documentation.

Can I enter a subnet mask instead of CIDR?

Yes. Use a contiguous dotted mask such as 255.255.255.0. Non-contiguous masks are rejected because ordinary CIDR subnetting requires consecutive network bits.

Why does a /31 show two usable addresses?

RFC 3021 permits both addresses on point-to-point IPv4 links. There is no traditional network and broadcast reservation in that specific use.

Why does a /32 show one address?

A /32 identifies a single IPv4 host. It is common in routing, firewall objects, loopbacks, and access rules.

What does a wildcard mask do?

It is the inverse of the subnet mask. Wildcard masks are commonly used in access control lists and some routing configurations.

How does VLSM reduce waste?

VLSM gives each segment the smallest suitable subnet. Large networks are allocated first. Smaller blocks then fit into the remaining address space.

Does IPv6 have a broadcast address?

No. IPv6 uses multicast and neighbor discovery instead. The calculator therefore reports broadcast as not applicable in IPv6 mode.

Can I export a subnet plan?

Yes. Successful calculations can be downloaded as CSV, JSON, or a simple PDF. Browser printing can also create a formatted PDF.

Related Calculators

Average Calculator StatisticsGeometric Mean CalculatorInter Quartile Range CalculatorLower Quartile CalculatorMaximum CalculatorMean Calculator StatisticsMedian Calculator StatisticsMidhinge Calculator StatisticsMid Range Calculator StatisticsMode Calculator Statistics

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.