Calculate network subnets with precise CIDR notation, IP ranges, and host counts. Access via MCP in Cursor or Windsurf for network planning, or REST API at /v1/ip/subnet. Input a network like 192.168.1.0/24 with desired subnet size to get calculated ranges, broadcast addresses, and usable host counts. Returns deterministic subnet divisions for network architecture.
curl "https://tinyfn.io/v1/ip/subnet" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/ip/subnet', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/ip/subnet',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's ip address tools:
{
"mcpServers": {
"tinyfn-ip": {
"url": "https://tinyfn.io/mcp/ip",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Pass the network CIDR and desired subnet count or size. Returns subnet ranges, broadcast addresses, and host counts for each calculated subnet.
Network address, broadcast address, usable IP range, subnet mask, and host count for each subnet. Also validates CIDR notation and calculates optimal divisions.
Yes, AI agents in Cursor or Claude Code can calculate subnets for Terraform, Ansible, or cloud infrastructure configurations automatically.
Supports both IPv4 and IPv6 subnet calculations with proper CIDR notation. IPv6 returns prefix lengths and address ranges.
Returns an error indicating insufficient address space. Shows maximum possible subnets for the given network size.
Get your free API key and start using Subnet Calculator in seconds.
Get Free API Key