RSTP Path Cost Calculator
Work out 802.1D/802.1w port and root path costs using the long or short cost table, including aggregated links.
Inputs
Port Path Cost
20,000
Root Path Cost
60,000
Long-Method Cost
20,000
Short-Method Cost
4
Effective Link Speed
1,000Mbps
Fits the Cost Field
Yes — 60000 of a 200000000 maximum
Step by step
Values used
Link speed = 1 Gbps; Cost method = Long — 802.1D-2004, 32-bit costs; Members in the port channel = 1 links; Hops to the root bridge = 3 hops
RSTP Path Cost
Long-method cost = 20,000,000 ÷ link speed in Mbps, giving 2,000,000 for 10 Mb, 200,000 for 100 Mb, 20,000 for 1 Gb, 2,000 for 10 Gb and 200 for 100 Gb.
802.1D-1998 short cost table
Short method: 100 for 10 Mb, 19 for 100 Mb, 4 for 1 Gb, 2 for 10 Gb and above.
Port Path Cost
= 20,000
Root Path Cost
= 60,000
Long-Method Cost
= 20,000
Short-Method Cost
= 4
Effective Link Speed
= 1,000 Mbps
Fits the Cost Field
= Yes — 60000 of a 200000000 maximum
How it works
Cost is inversely proportional to bandwidth, and the root path cost is the sum of the port costs a BPDU accumulates on its way from the root. The 16-bit short table saturates at 10 Gb — everything faster also costs 2 — which is why 802.1D-2004 introduced the 32-bit long table. Two links of very different speed can end up with the same cost under the short method, so the spanning tree happily blocks a 100 Gb link in favour of a 10 Gb one until you switch the whole domain to long costs.
Formulas
RSTP Path Cost
Long-method cost = 20,000,000 ÷ link speed in Mbps, giving 2,000,000 for 10 Mb, 200,000 for 100 Mb, 20,000 for 1 Gb, 2,000 for 10 Gb and 200 for 100 Gb.
- 20,000,000
- Numerator of the 802.1D-2004 long cost table, in Mbps
- root path cost
- Sum of the port costs along the path to the root bridge
- effective speed
- Member speed × members, because a bundle is costed as one logical link
802.1D-1998 short cost table
Short method: 100 for 10 Mb, 19 for 100 Mb, 4 for 1 Gb, 2 for 10 Gb and above.
Frequently Asked Questions
How is RSTP Path Cost calculated?
Long-method cost = 20,000,000 ÷ link speed in Mbps, giving 2,000,000 for 10 Mb, 200,000 for 100 Mb, 20,000 for 1 Gb, 2,000 for 10 Gb and 200 for 100 Gb. Cost is inversely proportional to bandwidth, and the root path cost is the sum of the port costs a BPDU accumulates on its way from the root. The 16-bit short table saturates at 10 Gb — everything faster also costs 2 — which is why 802.1D-2004 introduced the 32-bit long table.
Why does RSTP Path Cost matter?
Two links of very different speed can end up with the same cost under the short method, so the spanning tree happily blocks a 100 Gb link in favour of a 10 Gb one until you switch the whole domain to long costs.
What values do I need to enter?
This calculator takes 4 inputs: Link speed, Cost method, Members in the port channel, Hops to the root bridge. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
Can I mix long and short costs in one domain?
No. Cost is carried in the BPDU with no indication of which table produced it, so a mixed domain compares incompatible numbers and picks the wrong root port. Change every bridge in the region together.