Skip to main content

IP Address & CIDR Calculator

Calculate subnet details from any IPv4 address and CIDR prefix.

How it works

  1. 1

    Enter an IP address

    Type an IPv4 address like 192.168.1.0 in the input field.

  2. 2

    Set the CIDR prefix

    Use the slider or quick buttons to select the prefix length (e.g., /24).

  3. 3

    Review subnet details

    See network address, broadcast, host range, mask, and binary breakdown.

Common use cases

  • Class C subnet

    192.168.1.0 /24

  • Small subnet

    10.0.0.0 /28

About This Tool

Enter an IPv4 address and CIDR prefix length to instantly calculate the network address, broadcast address, subnet mask, wildcard mask, first and last usable host, total and usable host count, IP class, and whether the address is private or public.

Includes quick-select buttons for common CIDR prefixes (/8, /16, /20, /22, /24, /25, /26, /27, /28, /30, /32) and a slider for fine-tuning. Expandable binary breakdown shows the bit-level split between network and host portions.

Useful for network engineers designing subnets, DevOps engineers configuring firewalls and VPCs, sysadmins planning IP allocation, and students learning subnetting. All calculations use bitwise operations in JavaScript -- nothing is sent to any server.

More examples

Examples

Class C subnet

Input

192.168.1.0 /24

Output

Network: 192.168.1.0, Broadcast: 192.168.1.255, Usable: 254 hosts

Small subnet

Input

10.0.0.0 /28

Output

Network: 10.0.0.0, Broadcast: 10.0.0.15, Usable: 14 hosts
Frequently Asked Questions
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation combines an IP address with a prefix length: 192.168.1.0/24. The /24 means the first 24 bits are the network portion, leaving 8 bits (256 addresses) for hosts.
What is the difference between network and broadcast address?
The network address has all host bits set to 0 -- it identifies the subnet. The broadcast address has all host bits set to 1 -- packets sent there reach all hosts on the subnet.
What is a wildcard mask?
The wildcard mask is the bitwise inverse of the subnet mask. It is used in access control lists (ACLs) on Cisco routers and other network equipment. For a /24 subnet, the wildcard mask is 0.0.0.255.
Does this support IPv6?
This calculator currently supports IPv4 only. IPv6 subnetting follows different conventions and may be added in the future.

Related Guides

Discover More Tools

View all Developer Tools →