Change language

Learn to calculate by playing with IPv4 CIDR subnet calculator

A short game to see where the result comes from. Pick a language and start; you can stop halfway and come back.

Loading the game…

← Back to IPv4 CIDR subnet calculator

What you will practise

Network, mask, broadcast and usable addresses of an IPv4 block.

How it works

The prefix determines the mask. The network address comes from a logical AND between the IP and the mask, and the broadcast from filling the host bits with ones.

Formula

Mask = 32 − prefix bits set to zero

Hosts = 2^(32 − prefix) − 2

Worked example

For 192.168.1.0/24:

Mask: 255.255.255.0
Range: 192.168.1.1 – 192.168.1.254
Usable hosts: 254

How to play

First pick your language. Then work through the challenges one by one: each sets out a case with real numbers and, if you get stuck, you can ask for a hint. When you answer, you see whether you got it right and why. Progress is saved only in your browser, so you can stop halfway and carry on another day.