CIDR Calculator
Calculate IP address ranges from CIDR notation. Convert between CIDR, subnet masks, and IP ranges. Essential for configuring SPF records and understanding IP allowlists.
Calculate IP ranges from CIDR notation
CIDR Notation
192.168.1.0/24Like this tool? Try Sequenzy for free
AI-powered email marketing with Stripe integration, automations, and built-in analytics.
Network Address
192.168.1.0Broadcast Address
192.168.1.255First Usable Host
192.168.1.1Last Usable Host
192.168.1.254Subnet Mask
255.255.255.0Wildcard Mask
0.0.0.255Total IPs
256
Usable Hosts
254
SPF Record Format
ip4:192.168.1.0/24Common CIDR Ranges
/32 = 1 IP (single host)
/30 = 4 IPs (point-to-point)
/24 = 256 IPs (Class C)
/16 = 65,536 IPs (Class B)
About this tool
If you've ever needed to authorize a range of IP addresses in an SPF record or configure a firewall allowlist for your mail server, you've encountered CIDR notation. It's the standard way to express IP address ranges compactly — instead of listing hundreds of individual IPs, you write something like 198.51.100.0/24 and cover all 256 addresses at once. This calculator converts between CIDR notation, subnet masks, and IP ranges so you don't have to do the binary math yourself.
How CIDR notation works
An IPv4 address is 32 bits long. The number after the slash tells you how many of those bits are fixed (the network portion), and the remaining bits are variable (the host portion). A /24 means 24 bits are fixed and 8 are variable, giving you 2^8 = 256 possible addresses. A /32 means all bits are fixed — it's a single IP. A /16 means 16 bits are variable, giving you 65,536 addresses. The most common ranges you'll encounter in email: /32 (single server), /28 (16 IPs — a small dedicated pool), /24 (256 IPs — a typical allocation from an ISP or cloud provider).
CIDR in email authentication
SPF records are where most email senders encounter CIDR. When you add ip4:198.51.100.0/24 to your SPF record, you're authorizing every IP from 198.51.100.0 to 198.51.100.255 to send email for your domain. This is essential when your ESP or mail infrastructure uses a pool of IPs that can change. Instead of listing each IP individually (and hitting SPF's 10-lookup limit), a single CIDR range covers them all with one mechanism. Use our SPF generator to build records with proper CIDR notation.
Common CIDR mistakes in email setups
The biggest mistake is authorizing too broad a range. Using /16 (65,536 IPs) in your SPF record when your ESP only uses 4 IPs from that range means you're also authorizing thousands of IPs you don't control — potentially including spammers on the same network. Be as specific as possible. If your provider uses 198.51.100.10 through 198.51.100.14, a /28 or even listing individual /32 entries is safer than a /24. Ask your provider for their exact IP ranges rather than guessing.
IPv6 CIDR considerations
IPv6 uses the same CIDR concept but with 128-bit addresses. A typical IPv6 allocation is /48 (for organizations) or /64 (for subnets). In SPF records, you'd use the ip6: mechanism with CIDR notation, like ip6:2001:db8::/48. As more mail servers adopt IPv6, you'll need to include both ip4 and ip6 ranges in your SPF configuration. After setting up your ranges, verify them with the DNS propagation checker to ensure your records are visible globally.
Frequently Asked Questions
More Free Tools
View all toolsEmail Bounce Rate Calculator
Calculate your email bounce rate and compare it against industry benchmarks. Break down hard vs soft bounces and get actionable recommendations to improve deliverability.
Email Countdown Timer Generator
Create countdown timer HTML for your email campaigns. Choose from 3 styles, customize colors, and get email-compatible HTML. Includes guidance on making the timer live with image-based services.
Fake Email Generator for Testing
Generate random, realistic-looking email addresses for development and testing. Customize format, domain, and quantity. Never use real emails in test environments again.
SPF Record Flattener
Flatten your SPF record by resolving all include mechanisms to IP addresses, reducing DNS lookups below the 10-lookup limit. Analyze your current SPF record and get a flattened version.