Skip to content
UniKit

IPv4 subnet calculator

Enter an IPv4 address with CIDR to get the network address, broadcast address, subnet mask, wildcard mask, usable host range and count, IP class, address flags and binary form — plus reverse lookup from a required host count.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Subnet details

Network address192.168.1.0
Broadcast address192.168.1.255
Subnet mask255.255.255.0
Wildcard mask0.0.0.255
First usable address192.168.1.1
Last usable address192.168.1.254
Usable hosts254
Total addresses256
IP classC
Prefix length192.168.1.10/24
Binary11000000.10101000.00000001.00001010
Network address in binary11000000.10101000.00000001.00000000

Address flags

Private addressYes
Loopback addressNo
Link-local addressNo
Multicast addressNo
Carrier-grade NATNo
Reserved (240/4)No
Limited broadcastNo

Reverse lookup by host count

Prefix length/25
Subnet mask255.255.255.128
Usable hosts126
Total addresses128

What this tool does

  • Plan a LAN: enter 192.168.1.10/24 and get the network address, broadcast address, subnet mask, wildcard mask and usable host range in one go, ready to paste into router and DHCP config.
  • Check block boundaries before writing an ACL, NAT rule or security-group entry: is the network address 192.168.1.0 or 192.168.1.10, and what is the broadcast address?
  • Reverse lookup by host count: a department with 100 devices maps to /25 and the mask 255.255.255.128, which yields 126 usable addresses.
  • Check address flags: confirm whether an address is private, loopback, link-local, multicast or carrier-grade NAT before treating it as internal.

Example

Input

192.168.1.10/24

Output

Network address 192.168.1.0
Broadcast address 192.168.1.255
Subnet mask 255.255.255.0
Wildcard mask 0.0.0.255
First usable address 192.168.1.1
Last usable address 192.168.1.254
Usable hosts 254
Total addresses 256
IP class C
Binary 11000000.10101000.00000001.00001010
Network address in binary 11000000.10101000.00000001.00000000

The flags section reports "private address: yes". Entering 100 in the reverse lookup yields /25, the mask 255.255.255.128 and 126 usable hosts.

Frequently asked questions

Why are /31 and /32 not reported as zero usable hosts?

Following RFC 3021, a /31 point-to-point link counts both addresses as usable (no network or broadcast address is reserved) and a /32 host route counts one. Every other prefix uses 2^(32-prefix) - 2, so a /24 gives 254.

What if I type an address without /24?

It is treated as /24, so 192.168.1.10 means 192.168.1.10/24. You can change that default in the prefix-length dropdown, which also rewrites the address in the input field to match.

Can I paste a subnet mask instead of a prefix length?

The input accepts CIDR such as 192.168.1.10/24 and the prefix length comes from the dropdown. The core logic can convert a mask back to a prefix length (and rejects non-contiguous masks), but the UI only exposes the dropdown, so a mask like 255.0.255.0 cannot be entered.

Do IP classes still matter?

The class (A/B/C/D/E, decided by the first octet) is a legacy classful-networking concept; modern routing is all CIDR and real planning ignores it. It is shown here mainly to match old documentation and exam questions — do not use it to decide whether an address is usable.

Are the addresses uploaded?

No. Everything is computed locally with 32-bit unsigned integer arithmetic, no network request is made, it works offline, and the addresses you enter are never recorded.

Keywords:ipv4subnetcidrnetmask子网掩码网络地址广播地址可用主机数反掩码ip 计算器

Related tools