Home / IPv4 Subnet Calculator

By Ali Zafar · Last updated November 2026

IPv4 Subnet Calculator

Enter an IPv4 address and a prefix length (like /24). You get the network address, subnet mask, wildcard, broadcast, the first and last usable host, the host count, what kind of address it is, and a bit-by-bit view that shows which bits are network and which are host. You can also split the network into smaller equal subnets.

IPv4 address

What it is: the address of one device in the network, four numbers from 0 to 255. How to choose: use the address printed in the camera, NVR or router settings. Example: 192.168.1.10.
What it is: how many leading bits are the network (0 to 32). 24 is the same as mask 255.255.255.0. How to choose: a small office or camera VLAN is usually /24; a point-to-point link can use /30 or /31. Example: 24.
What it is: a longer prefix to cut this network into equal smaller subnets. How to choose: leave empty to skip; it must be longer than the prefix above and at most 32. Example: with 192.168.1.0/24, enter 26 to get four /26 subnets.

Subnet

—
—
Subnet mask—
Wildcard mask—
Broadcast address—
Usable host range—
Usable hosts—
Total addresses—
Address type—

Binary view

1 network bits   0 host bits.

Subnets

Planning tool. It cannot see your network, so it never checks whether an address is already in use. At most 64 subnets are listed when you split.

How the subnet maths works

An IPv4 address is a 32-bit number. The mask has the first prefix bits set to 1. The network address is the address AND the mask. The broadcast address is the network address OR the wildcard (the mask with every bit flipped). Usable hosts are 2(32 − prefix) minus 2, because the network and broadcast addresses cannot be given to a device.

Special cases: /31 and /32

A /31 has two addresses and both are usable on a point-to-point link (RFC 3021), as long as both ends support it. A /32 is a single host. For every other prefix the network and broadcast addresses are subtracted.

Address types

The type follows the IANA special-purpose registry: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are private (RFC 1918); 100.64.0.0/10 is shared carrier-grade NAT space (RFC 6598); 127.0.0.0/8 is loopback; 169.254.0.0/16 is link-local; 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 are for documentation (RFC 5737); 224.0.0.0/4 is multicast.

Worked examples

192.168.1.10/24

Mask 255.255.255.0, network 192.168.1.0, broadcast 192.168.1.255, usable hosts 192.168.1.1 to 192.168.1.254, which is 254 hosts.

10.1.2.3/20

Mask 255.255.240.0, network 10.1.0.0, broadcast 10.1.15.255, 4,094 usable hosts.

Binary view

For 192.168.1.10 the address in binary is 11000000.10101000.00000001.00001010. With a /24 mask the first 24 bits are network bits and the last 8 are host bits; the view colours them differently so you can see where the boundary falls.

Common mistakes

  • Putting a camera and its NVR in different subnets without a router between them.
  • Using an address that is the network or broadcast address of the subnet.
  • Leaving no spare room: size the subnet for the cameras you will add later, not only today.

Frequently asked questions

How many usable hosts are in a /24?

A /24 has 256 addresses and 254 usable hosts, because the network address and the broadcast address cannot be assigned to devices.

What is a wildcard mask?

The wildcard mask is the subnet mask with every bit flipped. For 255.255.255.0 it is 0.0.0.255. Some routers and firewalls use it in access lists.

Can a /31 be used for a link between two devices?

Yes, RFC 3021 allows a /31 with two usable addresses on a point-to-point link. Both devices must support it, otherwise use a /30.

Is 192.168.1.10 a public or private address?

It is private (RFC 1918). It is not routed on the internet, so devices behind a router can reuse it.

Are my addresses sent anywhere?

No. The calculation runs in your browser. Nothing you type is sent to GaugeCalc or anyone else.

Related tools

For IPv6 use the IPv6 Subnet Calculator. To see how much network a camera system needs, use the IP Camera Bandwidth Calculator and the PoE Budget Calculator. Port numbers are in the Ports and Protocols guide.

Found a wrong result on this calculator? Send feedback →