Skip to main content

Calcu.fit

IP Subnet Calculator: Calculate Subnet Mask, Network Address & Host Range

Use this free IP Subnet Calculator to calculate important network details from an IPv4 address and subnet mask or CIDR prefix. Whether you are configuring a home network, managing business infrastructure, or learning about IP addressing, this tool makes subnet calculations easier enter an IP address and choose a subnet mask or CIDR notation to find the network address, broadcast address, first and last usable IP addresses, total addresses, available hosts, and wildcard mask you can use the results to plan network configurations, troubleshoot connectivity issues, and understand how IP subnetting divides networks into smaller sections.

IP Subnet Calculator

Enter network details

Enter an IPv4 address and select a CIDR prefix or subnet mask.

Network Address
192.168.1.0
/24

Subnet details

Network InformationResult

Binary representation

IP Address
Subnet Mask
Wildcard Mask

Calculation steps

    This calculator supports IPv4 subnet calculations from /0 through /32. Conventional subnets exclude the network and broadcast addresses from host assignment. /31 and /32 use their special addressing rules.

    How to Use This IP Subnet Calculator

    Follow these steps to calculate your IPv4 subnet information:

    1. Enter an IPv4 address, such as 192.168.1.10.

    2. Enter a subnet mask, such as 255.255.255.0, or select a CIDR prefix such as /24.

    3. Click Calculate to process your network information.

    4. Review the network address, broadcast address, and usable IP range.

    5. Check the total number of addresses and available host addresses.

    6. Use the wildcard mask and binary information if you need them for network configuration.

    You can change the IP address or subnet prefix to calculate a different network.

    What You'll See in Your Results

    The IP Subnet Calculator can display several important network details:

    • IP Address: The IPv4 address entered into the calculator.

    • Subnet Mask: The mask that identifies the network and host portions of an IP address.

    • CIDR Prefix: The number of network bits, such as /24 or /26.

    • Network Address: The first address identifying the subnet.

    • Broadcast Address: The address used to send traffic to all hosts on an IPv4 subnet.

    • First Usable IP: The first assignable host address in a conventional subnet.

    • Last Usable IP: The last assignable host address in a conventional subnet.

    • Total IP Addresses: The total number of addresses in the subnet.

    • Usable Hosts: The number of addresses available for ordinary host assignment.

    • Wildcard Mask: The inverse of the subnet mask, often used in network access control lists.

    • Network and Host Bits: The number of bits allocated to the network and host portions.

    Special prefixes such as /31 and /32 have different host-address rules, which the calculator should handle separately.

    What Is IP Subnetting?

    IP subnetting is the process of dividing a larger IP network into smaller logical networks called subnets.

    An IPv4 address contains 32 bits. A subnet mask determines which bits identify the network and which bits identify individual hosts.

    For example:

    192.168.1.10/24

    In this example:

    • IP address: 192.168.1.10

    • CIDR prefix: /24

    • Subnet mask: 255.255.255.0

    • Network portion: 24 bits

    • Host portion: 8 bits

    This subnet contains 256 total IPv4 addresses, with 254 conventionally usable host addresses.

    Subnetting helps network administrators organize devices, manage address allocation, and control network traffic.

    How IP Subnet Calculations Work

    The calculator uses the IPv4 address and subnet mask to determine the network boundaries.

    1. Calculate the Network Address

    The network address is calculated using a bitwise AND operation between the IP address and subnet mask.

    Network Address = IP Address AND Subnet Mask

    For example:

    IP address: 192.168.1.10

    Subnet mask: 255.255.255.0

    Network address: 192.168.1.0

    2. Calculate the Broadcast Address

    The broadcast address is calculated by setting all host bits to 1.

    Broadcast Address = Network Address OR Wildcard Mask

    For a 192.168.1.0/24 network, the broadcast address is:

    192.168.1.255

    3. Calculate the Wildcard Mask

    The wildcard mask is the inverse of the subnet mask.

    Wildcard Mask = 255.255.255.255 − Subnet Mask

    For example:

    Subnet mask: 255.255.255.0

    Wildcard mask: 0.0.0.255

    4. Calculate the Number of Host Bits

    IPv4 addresses contain 32 bits.

    Host Bits = 32 − CIDR Prefix

    For a /24 subnet:

    32 − 24 = 8 host bits.

    5. Calculate Total IP Addresses

    Total Addresses = 2^(Host Bits)

    For a /24 subnet:

    2^8 = 256 total addresses.

    6. Calculate Usable Host Addresses

    For conventional IPv4 subnets with prefixes from /0 through /30:

    Usable Hosts = Total Addresses − 2

    For a /24 subnet:

    256 − 2 = 254 usable host addresses.

    The two excluded addresses are normally the network address and broadcast address.

    Important exceptions:

    • A /31 subnet supports two endpoint addresses for point-to-point links.

    • A /32 prefix represents one individual IPv4 address.

    IP Subnet Calculator Examples

    Here are practical examples showing how different IPv4 subnet configurations work.

    Example 1: Calculate a /24 Subnet

    IP address: 192.168.1.10/24

    Subnet mask: 255.255.255.0

    Network DetailResult
    IP Address192.168.1.10
    CIDR Prefix/24
    Subnet Mask255.255.255.0
    Network Address192.168.1.0
    Broadcast Address192.168.1.255
    First Usable IP192.168.1.1
    Last Usable IP192.168.1.254
    Total IP Addresses256
    Usable Hosts254
    Wildcard Mask0.0.0.255

    This is a common subnet configuration for small private IPv4 networks.

    Example 2: Calculate a /26 Subnet

    IP address: 192.168.1.70/26

    Subnet mask: 255.255.255.192

    Network DetailResult
    IP Address192.168.1.70
    CIDR Prefix/26
    Subnet Mask255.255.255.192
    Network Address192.168.1.64
    Broadcast Address192.168.1.127
    First Usable IP192.168.1.65
    Last Usable IP192.168.1.126
    Total IP Addresses64
    Usable Hosts62
    Wildcard Mask0.0.0.63

    A /26 subnet contains 64 addresses, with 62 conventionally usable host addresses.

    Example 3: Calculate a /16 Subnet

    IP address: 172.16.10.25/16

    Subnet mask: 255.255.0.0

    Network DetailResult
    IP Address172.16.10.25
    CIDR Prefix/16
    Subnet Mask255.255.0.0
    Network Address172.16.0.0
    Broadcast Address172.16.255.255
    First Usable IP172.16.0.1
    Last Usable IP172.16.255.254
    Total IP Addresses65,536
    Usable Hosts65,534
    Wildcard Mask0.0.255.255

    This subnet provides a much larger address range than a /24 network.

    Example 4: Calculate a /30 Subnet

    IP address: 192.168.1.10/30

    Subnet mask: 255.255.255.252

    Network DetailResult
    IP Address192.168.1.10
    CIDR Prefix/30
    Subnet Mask255.255.255.252
    Network Address192.168.1.8
    Broadcast Address192.168.1.11
    First Usable IP192.168.1.9
    Last Usable IP192.168.1.10
    Total IP Addresses4
    Usable Hosts2
    Wildcard Mask0.0.0.3

    A /30 subnet is traditionally used for small point-to-point IPv4 links.

    Example 5: Calculate a /28 Subnet

    IP address: 192.168.10.20/28

    Subnet mask: 255.255.255.240

    Network DetailResult
    IP Address192.168.10.20
    CIDR Prefix/28
    Subnet Mask255.255.255.240
    Network Address192.168.10.16
    Broadcast Address192.168.10.31
    First Usable IP192.168.10.17
    Last Usable IP192.168.10.30
    Total IP Addresses16
    Usable Hosts14
    Wildcard Mask0.0.0.15

    This smaller subnet is useful when only a limited number of devices need IP addresses.

    Common IPv4 Subnet Mask and CIDR Chart

    Use this reference chart to understand common subnet masks, CIDR prefixes, and host capacities.

    CIDRSubnet MaskTotal IPsUsable Hosts
    /16255.255.0.065,53665,534
    /17255.255.128.032,76832,766
    /18255.255.192.016,38416,382
    /19255.255.224.08,1928,190
    /20255.255.240.04,0964,094
    /21255.255.248.02,0482,046
    /22255.255.252.01,0241,022
    /23255.255.254.0512510
    /24255.255.255.0256254
    /25255.255.255.128128126
    /26255.255.255.1926462
    /27255.255.255.2243230
    /28255.255.255.2401614
    /29255.255.255.24886
    /30255.255.255.25242
    /31255.255.255.25422*
    /32255.255.255.25511*

    The /31 and /32 entries follow their special IPv4 addressing rules. A /31 supports two endpoints on a point-to-point link, while /32 identifies a single address.

    What Is CIDR Notation?

    CIDR stands for Classless Inter-Domain Routing.

    It is a method of representing IP networks using an IP address followed by a slash and a number.

    For example:

    192.168.1.0/24

    The number 24 represents the number of bits used for the network portion of the address.

    Some common CIDR prefixes include:

    • /8: Large IPv4 network block.

    • /16: Medium-sized network block.

    • /24: Common small network block.

    • /25: Half of a /24 network.

    • /26: One-quarter of a /24 network.

    • /30: Four total IPv4 addresses.

    • /32: One individual IPv4 address.

    CIDR makes network allocation more flexible than the older class-based addressing approach.

    Private and Public IPv4 Addresses

    IPv4 addresses are commonly divided into private and public address categories.

    Private IPv4 Address Ranges

    Private addresses are reserved for use inside local networks and are not directly routable across the public internet.

    Private RangeCIDRAddress Range
    10.0.0.0/810.0.0.0 – 10.255.255.255
    172.16.0.0/12172.16.0.0 – 172.31.255.255
    192.168.0.0/16192.168.0.0 – 192.168.255.255

    These addresses are commonly used in homes, offices, schools, and private networks.

    Public IPv4 Addresses

    Public IP addresses are globally unique addresses used for internet communication.

    They are assigned through the appropriate internet address allocation and registration systems.

     

    A subnet calculator can calculate the network boundaries of both private and public IPv4 addresses. It does not determine whether an address is currently assigned or reachable.

    Why Is Subnetting Important?

    Subnetting is an important part of network planning and administration.

    1. Better IP Address Management

    Subnetting allows network administrators to allocate address ranges according to the number of devices in each network.

    2. Network Organization

    Different departments, devices, or locations can use separate subnets.

    3. Improved Network Control

    Subnet boundaries can help administrators apply network policies and control communication between network segments.

    4. Reduced Broadcast Traffic

    Dividing a large network into smaller subnets can reduce the number of devices receiving local broadcast traffic.

    5. Efficient Network Planning

    Subnetting helps avoid unnecessarily large address allocations and supports more organized infrastructure.

    Common Subnetting Mistakes

    When calculating IPv4 subnets manually, these mistakes can cause incorrect network configurations:

    • Using an incorrect subnet mask.

    • Confusing a network address with a usable host address.

    • Assigning the broadcast address to an ordinary device.

    • Calculating the wrong CIDR prefix.

    • Forgetting that IPv4 addresses contain 32 bits.

    • Applying the conventional two-address deduction to /31 and /32 prefixes.

    • Using a subnet mask that does not match the intended network range.

    Always verify the network address, broadcast address, and usable range before configuring routers, switches, firewalls, or servers.

    IP Subnet Calculator vs. Other Network Tools

    Different network calculators serve different purposes.

    • IP Subnet Calculator: Finds subnet masks, network addresses, broadcast addresses, and usable IP ranges.

    • IP Address Calculator: Helps calculate and understand IP address information.

    • CIDR Calculator: Calculates network ranges and host capacities from CIDR notation.

    • IPv4 to IPv6 Converter: Helps understand differences between IPv4 and IPv6 addressing formats.

    • Binary Calculator: Performs calculations using binary numbers.

    • IP Address Lookup: Provides information about an IP address, depending on the lookup service.

    Use the appropriate tool depending on your network administration or troubleshooting needs.

    Frequently Asked Questions (FAQ)

    What is an IP Subnet Calculator?

    An IP Subnet Calculator is a network tool that calculates subnet information from an IPv4 address and subnet mask or CIDR prefix. It can display network addresses, broadcast addresses, usable host ranges, and total IP addresses.

    A subnet mask is determined by the CIDR prefix. For example, a /24 prefix corresponds to 255.255.255.0, while a /16 prefix corresponds to 255.255.0.0.

    A /24 CIDR prefix means that 24 of the 32 IPv4 bits are used for the network portion, leaving 8 bits for the host portion. It provides 256 total addresses and normally 254 usable host addresses.

    A conventional /24 IPv4 subnet contains 256 total addresses and 254 usable host addresses. The network and broadcast addresses are excluded from ordinary host assignment.

     A network address identifies an IPv4 subnet. It is calculated by applying a bitwise AND operation to the IP address and subnet mask.

     A broadcast address is used to send IPv4 traffic to all hosts on a subnet. In a conventional subnet, it is the highest address in the subnet range.

    CIDR stands for Classless Inter-Domain Routing. It represents an IP network using a slash followed by the number of network bits, such as /24 or /26.

     A wildcard mask is the inverse of a subnet mask. It is commonly used in network access control lists and routing configurations.

    A /30 subnet contains 4 total IPv4 addresses, with 2 conventionally usable host addresses.

    A subnet mask uses dotted-decimal notation, such as 255.255.255.0. A CIDR prefix expresses the same network boundary as a number, such as /24.

     Private IP addresses are used within local networks and are not directly routed over the public internet. Public IP addresses are globally routable addresses used for internet communication.

    This depends on the calculator. The tool described on this page focuses on IPv4 addressing. IPv6 calculations require a separate implementation that supports 128-bit addresses and IPv6 prefix notation.

    Yes. You can use this calculator for free without registration or a subscription.

    Disclaimer

    This IP Subnet Calculator is provided for general educational and network-planning purposes. It calculates IPv4 subnet information using standard addressing rules the results do not confirm whether an IP address is assigned, active, reachable, or available for use on a particular network before applying subnet settings to routers, switches, firewalls, or production infrastructure, verify the network design and check for overlapping address ranges.