Hi Ashoo,
It is calculated as follows 100000000/bandwidth in bps.
Now you need to add the resulted values from all outgoing links till the destination and this will result in the total cost to reach the destination and the path with the least value is the best and shortest path.
The algorithm places each router at the root of a tree and calculates the shortest path to each destination based on the cumulative cost required to reach that destination
Have a look at this link
http://www.cisco.com/warp/customer/104/1.html#t5
HTH
Ankur