{"uid":"cap_VqXdV06d6suCYD_VvZwKV","slug":"network-calc-ipv4-subnet-vlsm-calculator-efd7dc1e","name":"Network Calc: IPv4 Subnet & VLSM Calculator","description":"Split an IPv4 network into equal subnets, or allocate VLSM subnets from host counts (largest first) with ranges and leftovers.","url":"https://network-calc.x402tookit.com/subnet-vlsm?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["network"],"properties":{"hosts":{"type":"string","description":"Host requirements, comma separated, optionally named: LAN-A:100,LAN-B:50,WAN:2"},"parts":{"type":"integer","description":"Equal split into this many subnets (a power of two, up to 1024)"},"network":{"type":"string","description":"IPv4 CIDR to divide, for example 192.168.1.0/24"},"newPrefix":{"type":"integer","description":"Equal split into subnets of this prefix length"},"pointToPoint":{"type":"string","description":"true: give 2-host links a /31 (RFC 3021) instead of a /30"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"fits":{"type":["boolean","null"]},"mode":{"type":["null","string"]},"source":{"type":["null","string"]},"network":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"subnets":{"type":["array","null"]},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"disclaimer":{"type":["null","string"]},"freeBlocks":{"type":["array","null"],"items":{"type":"object","properties":{"cidr":{"type":["null","string"]},"addresses":{"type":["null","number"]}}}},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"allocations":{"type":["array","null"],"items":{"type":"object","properties":{"cidr":{"type":["null","string"]},"name":{"type":["null","string"]},"prefix":{"type":["null","number"]},"netmask":{"type":["null","string"]},"network":{"type":["null","string"]},"broadcast":{"type":["null","string"]},"lastUsable":{"type":["null","string"]},"firstUsable":{"type":["null","string"]},"usableHosts":{"type":["null","number"]},"fitsInParent":{"type":["boolean","null"]},"requestedHosts":{"type":["null","number"]},"totalAddresses":{"type":["null","number"]},"wastedAddresses":{"type":["null","number"]}}}},"subnetCount":{"type":["null","number"]},"subnetPrefix":{},"usedAddresses":{"type":["null","number"]},"totalAddresses":{"type":["null","number"]},"addressesPerSubnet":{},"utilizationPercent":{"type":["null","number"]},"usableHostsPerSubnet":{}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_g5xfbGwQKBJKap3Zp-hWl","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Splits an IPv4 network into equal subnets or allocates VLSM subnets from named host counts, returning ranges, netmasks, usable addresses, and leftover free blocks.","exampleAgentPrompt":"Can you split 192.168.10.0/24 into VLSM subnets for three segments — LAN-A needs 100 hosts, LAN-B needs 50, and WAN needs 2 — and show me the CIDR, netmask, usable range, and any leftover free blocks?","exampleUseCases":[{"title":"Office network IP address plan","prompt":"I need to design subnets for our new office network at 10.0.0.0/22 — we have four departments: Engineering needs 200 hosts, Sales needs 80, HR needs 30, and the WAN link needs 2. Can you do VLSM allocation and show me each subnet's CIDR, usable range, and what address space is left over?"},{"title":"Equal subnet split for VLANs","prompt":"Split 172.16.0.0/20 into 16 equal subnets for me and list each one with its network address, broadcast, and usable host range."},{"title":"Point-to-point WAN link subnetting","prompt":"I'm allocating subnets from 10.10.0.0/24 for three router-to-router WAN links that each need 2 hosts — can you use /31s for those links (RFC 3021) plus one LAN segment needing 50 hosts, and tell me what's left over?"}],"resultDescription":"Returns an array of subnet allocations each with CIDR, prefix length, netmask, network address, broadcast address, first and last usable host, and name (for VLSM). Also returns a list of unallocated free blocks with their CIDRs and address counts, a mode indicator (equal-split or VLSM), a summary string, and fit status indicating whether all requested hosts fit within the parent network.","failureModes":["Invalid or malformed CIDR (e.g. host bits set) returns an error with reasons array","Requested parts not a power of two returns validation error","Host counts exceed available space in the parent network — fits=false with explanation","Conflicting parameters (both parts and hosts specified) may return an error","Network parameter missing returns 400-level error"],"whenToPreferThis":"Use this endpoint when you need to programmatically plan IPv4 address space — either carving a block into equal-sized chunks for VLANs/segments, or performing VLSM allocation where segments have different host requirements. It is purpose-built for network engineers and automation scripts that need precise subnet math including usable ranges, broadcast addresses, and leftover free block accounting. Prefer it over generic IP libraries when you want a structured JSON result with named allocations and free-block inventory in a single call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:12:40.382Z","isFirstParty":false,"canonicalSlug":"network-calc-ipv4-subnet-vlsm-calculator-efd7dc1e"}