Inbreeding Calculator

by Sam Kauffman of Zika Hamstery

Jump to Instructions

Go to Inbreeding Calculator

About inbreeding

This tool allows you to calculate the inbreeding coefficient of a pedigree. The inbreeding coefficient, commonly labeled F and expressed as a percent, is a measure of the amount of consanguinity in an individual’s ancestry, in other words, how closely related its parents are. This method for giving a numeric value to inbreeding was created by Sewall Wright in 1922. If the individual’s parents are related, it is inbred, and its inbreeding coefficient is greater than zero. The value of the coefficient depends on how many common ancestors the individual’s parents have, how distant they are, and how many times they occur in the pedigree. Mathematically, it is the probability that for a given autosomal gene (one that is not on the sex chromosome), the two alleles inherited from the parents will be autozygous, that is, not just homozygous (identical), but also having descended from the same exact allele in a common ancestor. “Identical by descent” is another term for this.

It is well known that inbreeding has its detriments. Most mutations are recessive, and most are deleterious, or harmful. An individual with one copy of a deleterious recessive mutation still has one functional copy of the gene, so the mutation doesn’t affect the phenotype. The individual isn’t even known to have the mutation unless a genetic test is performed. However, if two of that individual’s offspring mate, the second generation offspring might inherit two copies of the deleterious recessive mutation, and the mutation’s negative effects will be realized. Thus inbreeding decreases the chances of viability and fitness of the offspring. This phenomenon is called inbreeding depression.

The theory is simple enough, and it has also been confirmed repeatedly by observation. In economically important species, researchers have determined exactly how strongly inbreeding affects certain attributes. For example, in Holstein cattle, the inbreeding depression of lifetime milk production is −64 kg per 1% of inbreeding. So a cow with a high inbreeding coefficient of 15% will produce 950 kg less milk in her lifetime than one that isn’t inbred. That being said, all Holsteins are inbred to some extent, and the average U.S. Holstein inbreeding coefficient is 5.9%. [source]

It works in humans, too. Most genetic diseases are recessive, and they tend have higher rates of occurrence among genetically isolated populations, i.e., people that, for several generations, marry only within their group (endogamy), whether out of choice, like religious groups and royal families, or necessity, like island populations. The Amish and Mennonites of North America are one example that have proven excellent subjects for studies on inbreeding because not only are they a largely isolated population, but they have detailed written family histories, allowing researchers to trace gene carriers down through the generations.

My father comes from several generations of Amish and Mennonites, and I have used these family records to calculate his inbreeding coefficient of 0.32%. His parents are double fourth cousins. If that sounds like a travesty to you, check out some of the links below about social attitudes toward consanguineous marriage throughout history. Who knows? Maybe your parents are fourth cousins. To be certain that they aren’t, you would have to know all 64 of your great-great-great-great-grandparents. Of course, if your parents are of different ethnic groups, you know they are not related.

Some of the most famous accounts of inbreeding come from royal dynasties which practiced marriage between relatives in order to keep their blood pure or to avoid sharing power with other families. Regular consanguineous marriage was practiced by the rulers of several ancient civilizations. In ancient Egypt, it was normal for the Pharaoh’s eldest daughter and son to marry each other and become the new rulers. Over the generations, the negative effects of inbreeding were realized; Pharaoh Tutankhamen is believed to have had several genetic afflictions.

The monarchs of Europe were no exception. No account of the consequences of inbreeding is more ubiquitous than that of the House of Habsburg, the Austrian royal family who expanded their power to cover half of Western Europe. One of their main ways of keeping that power was to avoid marrying anyone else. Several generations of inbreeding let to increasingly pronounced mandibular prognathism, a condition causing a jutting jaw and severe underbite. This culminated in King Charles II of Spain (1661-1700). His inbreeding coefficient was a shocking 25.4% (see examples below). That’s higher than the inbreeding coefficient of the offspring of two full siblings. In addition to the trademark “Habsburg lip”, he had several other mental and physical disabilities. To top it off, he was infertile, so that was the end of the inbreeding; ultimately the problem solved itself. The inbred Habsburgs had a high rate of child mortality, so when Charles died young, no Spanish Habsburg was left to succeed him, and another royal family took over the Spanish throne. You can read more about Charles and the Habsburgs here.

I breed Syrian hamsters, and I created this tool to enable me to be aware of the amount of inbreeding in my hamsters, and to create breeding plans that minimize inbreeding. I plan to use it to run some simulations on various breeding patterns, which I’ll post later on. Of course, minimizing inbreeding is not the primary goal of anybody breeding domestic animals; it is to produce quality animals. If an individual has excellent traits, you want to increase the genetic contribution of that individual to later generations, and this can only be done through inbreeding. A breeder must strike a balance. Fortunately, this tool shows not only the total amount of inbreeding, but how much comes through which ancestors, so you can tell whose genes are being concentrated. Know, however, that inbreeding through a phenotypically excellent ancestor does not offer any protection from the dangers of deleterious recessive mutations.

Breeders working with laboratory rodents have different goals, and they may try to maximize the inbreeding coefficient. In medical research, it is ideal for the subjects to be as genetically similar as possible, and this is achieved through intentional extreme inbreeding. Many of the most commonly used strains of laboratory mice have inbreeding coefficients close to 100%.

Inbreeding calculations, of course, are only as good as the data in the pedigree. Adding data by making the pedigree deeper might bring new common ancestors to light. Thus, adding data can increase the inbreeding coefficient but will never decrease it. If you go back further, you will always find more inbreeding. We are all inbred to some extent. As proof of that, if you assume there is no consanguinity in your pedigree, then your number of ancestors must increase by a factor of 2 for each generation back. Eventually, you will reach a number larger than the total human population at that time. All inbreeding calculations are performed under the assumption that there is no inbreeding except what can be determined from the pedigree. All domestic Syrian hamsters are descended from a litter that was captured in Syria in 1930, but that doesn’t figure into my inbreeding calculations simply because I don’t have the data linking my hamsters to those. However, my calculations will get more accurate as I produce more generations and my pedigrees get more complete.

It must be mentioned that since the inbreeding coefficient is a probability, it represents the most likely proportion of an individual’s genes that are autozygous, but the actual proportion can still vary. Since meiosis involves some randomness, an individual might not have exactly 25% of its DNA coming from each grandparent. With each step of meiosis, the potential deviation from the inbreeding coefficient increases.

Simple examples of inbreeding coefficients. These numbers are correct if the common ancestors themselves are not inbred. If they are, the inbreeding coefficient will be higher.
Relationship between parents Parents’ common ancestor(s) Inbreeding coefficient
Collaterally related parents
SiblingsBoth parents25.000%
Half-siblingsOne parent12.500%
Uncle-niece
Aunt-nephew
Both parents = grandparents12.500%
Half-uncle-niece
Half-aunt-nephew
Parent = grandparent6.250%
Granduncle-grandniece
Grandaunt-grandnephew
Both parents = G-grandparents6.250%
1st cousinsPair of grandparents6.250%
Half-granduncle-grandniece
Half-grandaunt-grandnephew
Parent = G-grandparent3.125%
Half-1st cousinsGrandparent3.125%
1st cousins once removedPair of grandparents = G-grandparents3.125%
Half-1st cousins once removedGrandparent = G-grandparent1.563%
1st cousins twice removedPair of grandparents = 2G-grandparents1.563%
2nd cousinsPair of G-grandparents1.563%
Half-1st cousins twice removedGrandparent = 2G-grandparent0.781%
Half-2nd cousinsG-grandparent0.781%
2nd cousins once removedPair of G-grandparents = 2G-grandparents0.781%
Half-2nd cousins once removedG-grandparent = 2G-grandparent0.391%
2nd cousins twice removedPair of G-grandparents = 3G-grandparents0.391%
3rd cousinsPair of 2G-grandparents0.391%
Half-2nd cousins twice removedG-grandparent = 3G-grandparent0.195%
Half-3rd cousins2G-grandparent0.195%
3rd cousins once removedPair of 2G-grandparents = 3G-grandparents0.195%
Directly related parents
Self-fertilization, clones, or identical twins*self50.000%
Parent-offspringself = parent25.000%
Grandparent-grandoffspringself = grandparent12.500%
G-grandparent-G-grandoffspringself = G-grandparent6.250%

*This is not possible in organisms such as mammals, in which the parents must be of opposite sexes.

Instructions

The basics: Enter the names of the ancestors in the pedigree and click Calculate to get the inbreeding coefficient and breakdown. With deep pedigrees (>9 generations), the calculation may take several seconds. It is fine to leave the offspring field blank. If you are typing a name that is already present elsewhere in the pedigree (after all, this is all about inbreeding), a menu will pop up and you can click on the name you want. When you do, all ancestors of the individual will be copied from the individual’s other occurrence. If you make changes to the ancestry of an individual that occurs more than once, the changes will immediately be reflected in all occurrences of the individual. This works intuitively.

Names: It is important to understand that individuals are identified by this tool only by their name, which is, frankly, whatever you choose to type into a field. If two fields contain the same text, they are assumed to refer to the same individual. Therefore if you have more than one John Smith in your pedigree, you will need to distinguish them in some way, like by breeder prefix or birth year, or use the ID numbers from a genealogy database you may by using. Likewise, Be sure you spell the names correctly. This tool will not recognize “John Smith” and “JOhn Smith” as the same individual. The auto-fill menu should help with this, allowing you to select an existing name by clicking instead of typing.

Identical twins: Identical twins are a special case. The have the same DNA, so as far as these calculations are concerned, they should be treated as the same individual (the same goes for clones). Given two identical twins Daniel and Darrell, Daniel’s offspring and Darrell’s offspring are genetically as closely related to each other as half siblings are, that is, as closely related as two of Daniel’s offspring would be to each other if they had different mothers. In this tool, therefore, you should use the same name to identify both identical twins, for example, “Daniel and Darrell”.

Generation selector: The generation selector lets you control how much of the pedigree you see. The max is 12. Data is stored back up to 12 generations, regardless of how many generations you see. If an individual in the farthest right column has ancestor data, a clickable arrow will show up, telling you that there is more data there.

Data persistence: What good is all this data if you can’t save it? Well, you can. Not in the web application itself, but you can copy the data to a file on your computer. Fill out the pedigree and then click “Show offspring’s data.” The text area below the controls will be filled with a blob of text (JSON format, if you’re curious). Simply select all of it (Ctrl+A) and copy (Ctrl+C). Then open a new text file on your computer and paste the blob of text. Save it with the extension “.json” or “.txt”. Reload the web page. (All fields should be blank. If you find that your browser has kindly filled some in for you, click “Clear pedigree.”) Copy the text from the file and paste it into the text area. Then click “Populate pedigree.” There is your pedigree, just as you left it.

Building pedigrees: Below the generation selector there are three pairs of buttons. The two in each pair do essentially the same thing, but the first one operates one the entire pedigree, while the second operates only the individual you have currently selected and its ancestors. Those are available only when there is an individual selected. This allows you to use existing pedigrees to provide parts for new pedigrees. For example, if you have two hamsters with pedigrees saved on your computer and you want to calculate the inbreeding coefficient of their potential offspring, just use the “Populate selected individual and ancestors” button to put their data in the “sire” and “dam” fields, and there is your new pedigree. You don’t have to enter any new data.

The nitty-gritty: If you want to get a closer look at the data stored in the tool, press F12 to open your browser’s JavaScript console, type “ancestors” and press Enter. It will list all the individuals in alphabetical order and show how many times each appears in the pedigree. You can use this as handy way to look for typos in the names. If you type “pedigree”, you can see the pedigree data as it would be outputted by the “Show offspring’s data” button.

Privacy: No data you enter in this tool is sent anywhere. All computation is done on your computer.

Development: This program and its documentation were created and are maintained by Sam Kauffman. The program and its instructions, but not the rest of the content on this page, are released under the terms of the GNU General Public License. The source code is available on GitHub. With questions, comments, or bugs, email zikahamstery@gmail.com. Bugs can also be reported on GitHub.

Examples

Here are some real-life examples of pedigrees that you can paste into the Inbreeding Calculator and calculate the inbreeding coefficient for yourself. Select the entire blob of text (Click inside the box and press Ctrl+A), paste into the Inbreeding Calculator, and click “Populate pedigree.”

Here are the pedigrees of two champion American racehorses, back seven generations. [source]

California Chrome: 2.94%

American Pharaoh: 0.93%

As mentioned above, the Pharaohs were into sibling marriage. Examine the 18th Dynasty of Egypt, and you’ll find three individuals with a 25% inbreeding coefficient, and Aames has 37.5%. [source]

The 32nd and last dynasty of Egypt, the Ptolemies, although they were not actually Egyptian but Macedonian Greeks, adopted the practice. Also notable is they they named most of their sons Ptolemy and most of their daughters Cleopatra. The last Pharaoh, Cleopatra VII (the famous Cleopatra) had an astonishingly high inbreeding coefficient of 45.26%. Remarkably, there are no accounts of genetic conditions among the Ptolemies. [source]

Speaking of genetic conditions, here is the pedigree of Charles II of Spain to five generations: [source]

The inbreeding coefficient is 23.10%. Using Wikipedia, I filled out the pedigree to nine generations (although there is so much overlap among generations, some branches go back to twelve), bringing the inbreeding coefficient to 24.70%. Try this example in the Inbreeding Calculator and see how many common ancestors it finds!

Researchers Alvarez, Ceballos, and Quinteiro have traced Charles’s pedigree back sixteen generations, which pushed the inbreeding coefficient up to 25.4%, higher than the 25.0% found in the offspring of full siblings. This demonstrates how adding more data can make the inbreeding coefficient go up.

If you’re interested in the math involved in inbreeding calculations, here is a page that explains it, with several examples that I tested in this tool to make sure my algorithm was working right.

Example 1: Inbred common ancestor: 6.45%

Example 2: No inbred common ancestor: 7.03%

Example 3: Three generations of sibling mating: 50.00%

Example 4: Pharaoh Hatshepsut: 25.00%, data above

Example 5: Directly related parents: 31.25%

Example 6: Directly and collaterally related parents: 33.20%

References and recommended reading

Inbreeding in general, and social attitudes toward it

The inbreeding coefficient

Inbreeding in dairy cattle

Inbreeding in the Habsburg dynasty

Inbreeding among North American Anabaptists

Other historical examples of inbreeding

By David Morrison at The Genealogical World of Phylogenetic Networks:



GPL logo The inbreeding calculator is licensed under the GNU General Public License v3.

Creative Commons License This content on this page is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.