Family tree template for Excel with a pedigree chart

For family history research or a gift for a big birthday: enter every person once with their father and mother, and Excel builds an ancestor list with Ahnentafel numbers and a printable pedigree chart over five generations. Below you also learn how the numbers and the lookups fit together.

In short: every person has an ID and points to their parents through Father ID and Mother ID. The starting person is number 1, the father of number n is 2n and the mother 2n+1 (Ahnentafel numbers, also called Kekulé numbers). INDEX/MATCH finds the person for each number, MATCH(n,{1,2,4,8,16},1) gives the generation, and the pedigree chart shows it all on one page.

You should know: INDEX and MATCH. Approximate MATCH is explained in the exercise.

Try it now

Ahnentafel numbers follow one simple rule: double it for the father, double it and add 1 for the mother. To go back, divide by 2.

Task Work with Ahnentafel numbers. B3: the number of the father of the person in B1. B4: the number of their mother. B5: the number of the child through whom the person is in the list (the person is that child's father or mother).

ABCDE
1 Ahnentafel no. of person 6 Starting person = 1, father of n = 2n, mother of n = 2n+1
2
3 Father's no.
4 Mother's no.
5 Child's no.
6
7

Download the family tree template

The template has four sheets: the people list for up to 300 people, the pedigree chart over five generations (starting person, parents, grandparents, great-grandparents and great-great-grandparents), the ancestor list with numbers 1 to 31, and instructions. The sample family is made up. Dates are text, written as your source has them: 14 May 1992, just 1938 or abt. 1900. The day-month-year style reads the same in the US and the UK. The chart and the ancestor list each fit one Letter page in landscape.

Preview of the family tree template in Excel: pedigree chart over five generations with Ahnentafel numbers, the starting person on the left, then parents, grandparents, great-grandparents and great-great-grandparents with dates, fathers in blue, mothers in pinkEnlarge preview

Download the finished template

The finished Excel file family-tree-template.xlsx, with sample rows and instructions, is free. All you need is a free account: no subscription, no payment details.

Figures, rates and sample data in the templates are as of 13 November 2026, without guarantee. Check that they still apply to you. The templates are mainly meant to show how to build this in Excel.

Create a free account and download the template Already have an account? Log in

What is in the template

SheetWhat it holdsFormula
PeopleID, first name, last name, birth surname, born, birthplace, died, place of death, father ID, mother ID, notesInputs
People, L and MNames of father and mother as a check=IFERROR(INDEX(First,MATCH(I5,ID,0))&" "&INDEX(Last,MATCH(I5,ID,0)),"ID not found")
People, N and OAhnentafel number and generation=MATCH(A5,'Ancestor list'!C5:C35,0), =MATCH(N5,{1,2,4,8,16},1)
Ancestor listNumbers 1 to 31, generation, ID, name, dates, relationshipID of no. n: father or mother ID of the person with no. INT(n/2)
Pedigree chartfive generations side by side, fathers blue, mothers pink=INDEX('Ancestor list'!D5:D35,n)

The curly braces are only for explaining; in the template the small table 1, 2, 4, 8, 16 sits next to the ancestor list and MATCH looks it up there.

Build it yourself, step by step

1. Link people by ID, not by name

Names make poor keys: there are three William Millers, and spellings change between old records. So every person gets a unique number, and father and mother sit next to it as numbers. INDEX with MATCH fetches the name for a number:

Task For each father ID in E2:E5, fetch the full name from the people list: first name, a space, last name. The IDs are not in order. Write the formula in F2; it is filled into F2:F5.

ABCDEF
1 ID First name Last name Father ID Father
2 7 George Miller 2
3 2 David Miller 4
4 11 Harold Clark 7
5 4 Robert Miller 11
6 1 Ethan Miller
7 9 Edith Miller
8 5 Margaret Miller
9 3 Karen Miller

This exercise is part of Premium.

Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.

See Premium Already Premium? Log in

The first exercise in this lesson is free.

If an ID does not exist, IFERROR catches the error and shows "ID not found". The template turns duplicate IDs red, because MATCH would only ever find the first one.

2. Fill the ancestor list from the people list

Number 1 is the ID in B2 of the pedigree chart. For every other number n, the list looks at the person with number INT(n/2): if n is even it takes their father ID, otherwise their mother ID. So number 6 is the father of number 3 and number 7 is the mother. If a parent is unknown, that number and every ancestor behind it stay empty.

3. Generation by approximate match

The generation depends on the number alone: 1 is generation 1, 2 and 3 are generation 2, 4 to 7 generation 3 and so on, each generation starting at a power of two. MATCH with match type 1 finds the largest start number that is not greater than n:

Task Which generation does each number belong to? Each generation starts at the number in column E: 1, 2, 4, 8, 16. You want the position of the largest start number that is not greater than the number in A2. Write the formula in B2; it is filled into B2:B8.

ABCDEF
1 Ahnentafel no. Generation From no. Generation
2 1 1 Starting person
3 3 2 Parents
4 6 4 Grandparents
5 13 8 Great-grandparents
6 9 16 Great-great-grandparents
7 22
8 30

This exercise is part of Premium.

Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.

See Premium Already Premium? Log in

The first exercise in this lesson is free.

4. A pedigree chart to print

On the chart every number has a fixed spot: generation 5 takes 16 boxes one below the other, generation 4 sits in the middle of each pair, and so on to the starting person in the middle on the left. Each box uses INDEX to fetch the name and short dates for its number from the ancestor list. Mothers have odd numbers, so the template colors them pink and fathers blue. Page layout tips: print setup in Excel.

Common mistakes

Dates entered as Excel dates

Excel counts dates from January 1, 1900 (the 1900 date system, the default in Excel for Windows). A date such as 8 Dec 1875 therefore stays text, and 1938 on its own would show as a date in 1905. The born and died columns are formatted as text so everything stays the way you type it.

Mixing up parent IDs

Enter a person's own ID as their father and you create a loop. The template turns a father or mother ID red when it equals the person's own ID.

Missing pedigree collapse

When relatives married each other, one person appears in two places on the chart. That is not an error. The people list then shows the lower number.

Ranges without $

When you fill the lookup formulas down, the ranges of the people list must stay fixed or they slide along. More on that: absolute references.

The formulas in German Excel

EnglishGerman
INDEX, MATCHINDEX, VERGLEICH
IFERROR, INTWENNFEHLER, GANZZAHL
TRIM, COUNTIFGLÄTTEN, ZÄHLENWENN
XLOOKUPXVERWEIS

The German version is called Stammbaum and uses the terms Kekulé-Nummer, Ahnenliste and Ahnentafel.

Which Excel versions does this work in?

INDEX, MATCH, IFERROR, INT and sheet protection work in all current versions of Excel, including Excel for Mac and Excel for the web. XLOOKUP would make the lookups shorter, but Microsoft lists it for Excel 2021, Excel 2024 and Microsoft 365, so the template uses INDEX and MATCH. VLOOKUP would also work because the ID is in the first column; INDEX with MATCH keeps working when you insert columns later.

FAQ

Is the family tree template free?

Yes. Download the Excel file with a free account, no subscription and no payment details.

What are Ahnentafel numbers?

A way of numbering ancestors: the starting person is 1, the father of n is 2n and the mother 2n+1. Fathers are even, mothers odd, and the number tells you the generation.

Can I show more than five generations?

The chart shows five generations so it fits on one page. To go further back, enter the ID of a great-great-grandparent in B2 and that person becomes the starting person.

Do siblings and children belong in it?

Yes, in the people list. They get no Ahnentafel number because the numbers only count ancestors, but with another ID in B2 anyone can become the starting person.

Why are the dates text?

Because Excel counts dates from January 1, 1900, and records often give only a year or an "abt.". As text, every entry stays exactly as written.

Up next: INDEX and MATCH

Look up values in any direction, even left of the lookup column, with exercises in your browser.

Practice INDEX/MATCH

All templates with instructions: Excel templates.

Write to us

Choose language

Select your preferred language