OSPF Cost Calculator
Calculate interface metrics from reference bandwidth, compare path costs and identify equal-cost multipath candidates. All calculations run locally.
Inputs
Enter one interface per line: name, bandwidth Mbps, optional metric override, optional disabled.
Enter one interface per line: name, bandwidth Mbps, optional metric override, optional disabled.
Core calculation
Interface cost = clamp(round(ReferenceBw ÷ InterfaceBw), 1, 65535). Path cost = Σ active interface costs. ECMP = paths sharing the lowest path cost.Reference bandwidth. Vendor defaults often use 100 Gbps or 40 Gbps as the numerator.
Rounding. Ceiling matches common Cisco/FRR behaviour; floor and nearest are available for policy checks.
Overrides. Manual metrics are preserved and flagged so automated cost never silently wins.
ECMP. Equal lowest path costs are multipath candidates after adjacency and area policy checks.
Engineering result
Active cost, best path and ECMP candidates from the reference-bandwidth model.
Total active cost
—Interface cost breakdown
| Interface | Mbps | Calculated | Used cost | Status |
|---|
Warnings and recommendations
Methodology
OSPF cost is reference bandwidth divided by interface bandwidth, rounded to the selected integer mode and bounded to 1–65535. A manual metric override is preserved and flagged for review. Path cost is the sum of active interface costs; paths with the same lowest cost are ECMP candidates.
Validate reference bandwidth, vendor defaults, area policy, interface speed and adjacency state before production changes.
Frequently asked questions
How is OSPF cost calculated?
OSPF cost is reference bandwidth divided by interface bandwidth, rounded to an integer and bounded to 1 through 65535.
ENGINEERING WORKFLOW
Continue the engineering workflow
Plan addressing, VLAN capacity, packet size, uplinks, optics, access policy and DNS behavior as one LAN design sequence.