This OSPF cost calculator works out interface costs from the reference bandwidth and link speed, and shows when your reference is too low to tell fast links apart. It runs entirely in your browser: nothing you type is sent to our server.
Loading the tool… It runs in your browser and needs JavaScript.
Table of Contents
The formula
Cost = reference bandwidth ÷ interface bandwidth, rounded down, at least 1 and at most 65535. With Cisco’s default reference of 100 Mbps, FastEthernet costs 1, but so do 1G, 10G and 100G links, so OSPF cannot prefer the faster paths.
Fixing the reference
router ospf 1
auto-cost reference-bandwidth 100000 ! 100 Gbps, in Mbps
Set the same reference on every router in the area, or the costs will not be comparable. A path’s total cost is the sum of the outgoing interface costs along it.
How we checked it
We checked the costs on 11-12 October 2026 for the standard speeds with 100 Mbps and 100 Gbps references and a sample path (cost 4 with the default reference, 1,210 with 100 Gbps).
Running EIGRP instead of OSPF? Use the EIGRP Metric Calculator.
Frequently asked questions
How is OSPF cost calculated?
Reference bandwidth divided by interface bandwidth, rounded down, with a minimum of 1.
What is the default OSPF reference bandwidth?
100 Mbps on Cisco IOS and many other platforms, which makes every link of 100 Mbps or faster cost 1.
Should I change the reference bandwidth?
Yes, to at least the speed of your fastest link, on every router in the OSPF domain.