In order to verify the math, I added a feature to allow you to modify the view and show potential interbred birds. I color coded those in Cayan and added the AVK and COI. Then you can do the math pretty easily to verify. Here is the math.
The trick is to find N the number of links from the parents of a given bird to the common ancestor. It is a common ancestor if you can traverse up from the father and back down through the mother. Some examples.
Single Common Grandparent
The common ancestor is 2097
The path is 5185-2097-7452
There are two links so N = 2
N+1 = 3, F = (1/2)^3 = 12.5% (correct)
Two common Great GrandParents
You have to sum up both. So need path to 2273 and path to 2097
7448-4601-2273-5186-7443 (4 connections) N+1 = 5
path to 2097
7448-4601-2097-5186-7443 N+1 = 5
(1/2)^5 + (1/2)^5 = .03125 + .03125 = 6.25% (correct)
This one is real interesting, but the math is correct
1514 has an AVK less than 1 but a COI of 0. 1514 is not interbred, but its father is. It's child however is inbred through the great great grandparents. The value of 4.69 is correct because there are three common ancestors.
(1/2)^6 + (1/2)^6 + (1/2)^6 = 4.69%