CIDR calculator

Short answer

What does /24 mean in an IP address?

/24 means that the first 24 bits of the IPv4 address are the network, so the block 203.0.113.0/24 covers 256 addresses from 203.0.113.0 to 203.0.113.255. In SPF it is written as ip4:203.0.113.0/24. The lower the number after the slash, the more addresses: /16 is 65,536 addresses and /32 is one.

Enter a block like 203.0.113.0/24, or a range from and to.

Why it matters

A block that is too large in SPF approves thousands of servers you do not control. The calculator shows exactly how many addresses the term covers.

Range to blocks

If you have a range that does not fit in one block, we work out the smallest blocks that cover it.

How to use the calculator

  • Enter a block, like 203.0.113.0/24 or 2001:db8::/48. The answer appears as you type.
  • Enter a range with a hyphen, like 203.0.113.10 - 203.0.113.40, to get the blocks that cover it.
  • Copy the SPF term straight into the SPF record.

Common sizes

  • IPv4 /32: 1 address. /29: 8. /28: 16. /24: 256. /16: 65,536.
  • IPv6 /128: 1 address. /64: one normal network. /48: a common allocation to a company.

Addresses that do not start on the block boundary

If you write 203.0.113.10/24, the receiver still uses the whole block from 203.0.113.0. The calculator warns when the address does not start on the boundary, so you see what the term really covers.

Questions and answers

What does /32 mean?

One single IPv4 address. For IPv6 it is /128.

How large blocks are fine in SPF?

Only blocks you own or that the provider gives you. The calculator warns when an IPv4 block is larger than /24 or an IPv6 block larger than /48.

What is the difference between a netmask and CIDR?

They say the same thing in two ways. The netmask 255.255.255.0 is the same as /24. SPF only uses CIDR.