OSPF Cost Calculator

Calculate interface metrics from reference bandwidth, compare path costs and identify equal-cost multipath candidates. All calculations run locally.

IN

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.

OS

Engineering result

Active cost, best path and ECMP candidates from the reference-bandwidth model.

Total active cost

—
—
Total active cost—
Active interfaces—
Best path cost—
ECMP paths—

Interface cost breakdown

InterfaceMbpsCalculatedUsed costStatus

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

    Current workflowEnterprise LAN & IP Planning Workflow

    Plan addressing, VLAN capacity, packet size, uplinks, optics, access policy and DNS behavior as one LAN design sequence.

    Step 7 of 12

    Related tools