Subnet Calculator API
Calculate network address, broadcast, mask, and hosts for IPv4 CIDR blocks.
What is the Subnet Calculator?
Computes network address, broadcast address, subnet mask, wildcard mask, total hosts, usable hosts, and first/last host IP for any IPv4 CIDR block.
How to Use
Call GET /api/v1/subnet-calc?cidr=192.168.1.0/24. Returns 15+ fields including binary representations.
Try it live
Test this endpoint in the interactive console
Open Console →
Frequently Asked Questions
Total vs usable hosts?
Usable = total - 2 (network + broadcast). For /31 both are usable for point-to-point links.