Free network calculator

Free IPv4 Subnet Calculator Online

Enter an IPv4 address and CIDR prefix to calculate complete subnet boundaries and address capacity.

IPv4 only. Try 192.168.1.25 with /24.

What Is a Subnet Calculator?

A subnet calculator takes an IPv4 address and a CIDR prefix, then calculates the network range that contains that address. It shows the network address, broadcast address, first and last usable addresses, subnet mask, wildcard mask, and the number of available addresses.

Subnetting divides a larger IP network into smaller sections. Each section can serve a team, office, server group, virtual network, or other part of an infrastructure. A clear subnet plan makes addresses easier to manage and can reduce routing and configuration mistakes.

The calculator from ipdnslookup supports IPv4 addresses and CIDR prefixes from /0 through /32. It uses the address and prefix together, so you can enter any host inside a subnet and still find the correct network boundaries.

How to Use the Subnet Calculator

Follow these steps to calculate an IPv4 subnet:

  1. Enter an IPv4 address: Type an address such as 192.168.1.25.
  2. Select a CIDR prefix: Choose a value from /0 to /32. A common small network uses /24.
  3. Select Calculate Subnet: The calculator finds the network containing your address.
  4. Review the boundaries: Check the network address, broadcast address, and usable range.
  5. Check capacity: Compare the total and usable address counts with the number of devices you need.
  6. Copy the correct value: Use the CIDR network, subnet mask, or wildcard mask required by your router, firewall, or cloud platform.

Example subnet calculation

IPv4 address: 192.168.1.25

CIDR prefix: /24

Result: The network is 192.168.1.0/24. Its broadcast address is 192.168.1.255. The traditional usable host range is 192.168.1.1 through 192.168.1.254, giving 254 usable host addresses from 256 total addresses.

Why Use Our IPv4 Subnet Calculator?

Manual binary subnet calculations are useful for learning, but they are easy to get wrong during real configuration work. One incorrect boundary can place a device in the wrong network or create an overlapping address range. Our IPv4 subnet calculator displays the main values together so you can compare them before changing a configuration.

  • Clear input: Enter one IPv4 address and choose a prefix from a simple list.
  • Complete boundaries: See the network, broadcast, first usable, and last usable addresses.
  • Capacity details: Review both total addresses and usable host addresses.
  • Configuration formats: Get CIDR notation, a dotted-decimal subnet mask, and a wildcard mask.
  • Safe large-network handling: Calculate a /0 or other large range without building a list of every address.
  • No signup: Use the normal calculator without creating an account.

How IPv4 Subnet Calculation Works

An IPv4 address contains 32 binary bits. The CIDR prefix tells you how many bits identify the network. The remaining bits identify addresses inside that network. For example, /24 uses 24 network bits and leaves 8 host bits. Eight host bits create 28, or 256, total addresses.

The subnet mask is another way to write the prefix. A /24 prefix becomes 255.255.255.0. The calculator applies that mask to the entered address to find the network address. It sets all host bits to zero for the network address and all host bits to one for the broadcast address.

For traditional subnets from /0 through /30, the network and broadcast addresses are reserved. The usable range begins one address after the network and ends one address before the broadcast. A /31 is commonly used for a point-to-point link and can use both addresses under RFC 3021. A /32 represents one specific host route.

Common Uses for a Subnet Calculator

  • Plan a local network: Choose a subnet with enough addresses for computers, phones, printers, and future devices.
  • Configure cloud networks: Check virtual network and subnet ranges before creating resources.
  • Set firewall rules: Convert a host address into the correct CIDR network for an allow or deny rule.
  • Troubleshoot connectivity: Confirm whether two IPv4 addresses are inside the same subnet.
  • Avoid overlapping ranges: Compare network and broadcast boundaries before connecting offices or virtual networks.
  • Prepare router settings: Find the dotted subnet mask or wildcard mask required by network equipment.
  • Study subnetting: Compare different prefixes and see how each one changes capacity and boundaries.

Understanding Your Subnet Results

  • CIDR Network: The calculated network address followed by its prefix, such as 192.168.1.0/24.
  • Network Address: The first address that identifies the subnet. It is not normally assigned to a device in traditional subnets.
  • Broadcast Address: The final address in an IPv4 subnet. Traditional IPv4 networks use it to address every host on the subnet.
  • First Usable IP: The first host address available in the traditional usable range. For /31 and /32, special rules apply.
  • Last Usable IP: The final host address available before the broadcast address, except for /31 and /32 networks.
  • Total Addresses: Every address inside the calculated range, including addresses reserved for network and broadcast use.
  • Usable Hosts: The number of addresses normally available to endpoints under the prefix rules explained above.
  • Subnet Mask: The dotted-decimal form of the CIDR prefix, such as 255.255.255.0.
  • Wildcard Mask: The inverse of the subnet mask. Some access control lists and network devices use this format.
  • Address Type: A classification such as private, public, loopback, link-local, multicast, or reserved.
  • Network and Host Bits: The number of bits used for the network and addresses inside it. Together they always total 32 for IPv4.
  • Address Position: The entered address's numbered position inside the complete subnet range, including reserved addresses.
  • Binary Subnet Mask: The 32 mask bits divided into four groups. Network bits appear as ones and host bits appear as zeros.
  • Previous and Next Subnet: Adjacent ranges of the same size when another range exists within IPv4 address space.

These advanced values help you verify a design from more than one angle. For example, a /24 must show 24 network bits, 8 host bits, and a binary mask ending in eight zeros. Adjacent subnet values are useful when planning consecutive ranges without overlap.

Choosing the Right CIDR Prefix

A smaller prefix number creates a larger address range. A /16 contains 65,536 total addresses, while a /24 contains 256. A larger prefix number creates a smaller range. A /28 has 16 total addresses and 14 traditional usable host addresses.

Choose a range that supports current devices and reasonable growth without being unnecessarily large. Very large broadcast domains can become harder to manage. Very small subnets can run out of addresses when new devices are added.

Cloud providers sometimes reserve extra addresses inside each subnet. Their available count can therefore be lower than the general result shown here. Always compare the calculation with the rules of the platform or equipment you are configuring.

Private and Public IPv4 Subnets

Subnet mathematics works the same for public and private IPv4 ranges. Private ranges are designed for internal networks and are not routed directly across the public internet. Common private blocks include 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.

A calculation does not reserve an address range or prove that you own it. When planning internet-facing systems, use only address space assigned by your provider or registry. You can learn more from the IANA IPv4 special-purpose address registry.

Important Limitations

This page currently calculates IPv4 subnets. IPv6 uses 128-bit addresses and different conventions, so it will have a separate calculator. The result also describes address mathematics, not the live configuration of a router, firewall, DHCP server, or cloud network.

Usable address policies can vary. The calculator treats both addresses in a /31 as usable for point-to-point links and a /32 as one host route. Some platforms reserve additional addresses. Confirm platform-specific rules before deployment.

Frequently Asked Questions

What is CIDR notation?

CIDR notation combines an IP network with a slash prefix. For example, 192.168.1.0/24 means the first 24 bits identify the network.

How many usable hosts are in a /24 subnet?

A traditional /24 has 256 total addresses and 254 usable host addresses after reserving the network and broadcast addresses.

Can I enter a host address instead of the network address?

Yes. Enter any IPv4 address inside the range, and the calculator will find the correct network address.

Why does a /31 show two usable addresses?

A /31 is commonly used on point-to-point links. RFC 3021 permits both addresses to be used because a normal broadcast address is not required there.

Does this calculator support IPv6?

No. This page is for IPv4. IPv6 subnet calculations should use a dedicated IPv6 calculator.

Does calculating a subnet change my network?

No. The calculator only displays mathematical results. It does not connect to or modify any router, device, or cloud account.

Related Tools and Calculators

Use the IP Lookup tool to inspect public network information, or browse the calculator directory for every published calculator from ipdnslookup. More subnet and CIDR calculators will be linked here after they are published.