I never could keep cousins straight. First cousins—the children of my parents' siblings—I understood, but I was lost when it came to second and third cousins, let alone those with the "removed" designation. Not that I cared; it was rarely an issue for me. When genealogy entered my life, however, family relationships suddenly needed to be a whole lot more specific.

After much puzzing over confusing definitions and tables, I gained enough head-knowledge to create the following algorithm. My gut instincts in the matter are still a bit fuzzy, so I fall back on the strategy of the confused high school algebra student and rely on formulas.It's a little nerdy—okay it's a lot nerdy—but it works for me, and I've never seen anything like it, so I post it here in case it may help someone else.To Calculate the Family Relationship Between Person A and Person B

Find C, the common ancestor between A and B.

Let N = the number of generations from A to C

Let M = the number of generations from B to C.

- If N = 0, A is the (M – 2)
^{th}great grandparent of B, where the 0^{th}great grandparent is defined as “grandparent,” the –1^{st}great grandparent is defined as “parent,” and the –2^{nd}great grandparent is defined as “self.”- If M = 0, A is the (N – 2)
^{th}great grandchild of B, where the 0^{th}great grandchild is defined as “grandchild,” the –1^{st}great grandchild is defined as “child,” and the –2^{nd}great grandchild is defined as “self.”- If N = 1 and M > 0, then A is B’s (M – 3)
^{th}great grandaunt/uncle, where the 0^{th}great grandaunt/uncle is defined as “grandaunt/uncle,” the –1^{st}great grandaunt/uncle is defined as “aunt/uncle” and the –2^{nd}great grandaunt/uncle is defined as “sister/brother.”- If M = 1 and N > 0, then A is B’s (N – 3)
^{th}great grandniece/nephew, where the 0^{th}great grandniece/nephew is defined as “grandniece/nephew,” the –1^{st}great grandniece/nephew is defined as “niece/nephew” and the –2^{nd}great grandniece/nephew is defined as “sister/brother.”- If N > 1, M > 1, and N = M, then A and B are (N – 1)
^{th}cousins.- If N > 1, M > 1, and N < M, then A and B are (N – 1)
^{th}cousins, M – N times removed.- If N > 1, M > 1, and N > M, then A and B are (M – 1)
^{th}cousins, N – M times removed.

Wow! Brother Rich did our family genealogy and explained it all, but he's a materials science person, not a computer nerd or mathematician, so used different words! "x cousin" means same generation as each other, whether first or second or third; "once removed" refers to the two people being in different generations from each other - once is one generation below, twice is two generations (e.g. the grandchild of a cousin.) What a mind you have!

There, now I've done it!

I'm very impressed and honored! Come back anytime. :)

I submit a correction (still in proofreading mode):

1. If N = 0, A is the (M – 2)th great grandparent of B, where the 0th great grandparent is defined as “grandparent,” the –1st great grandparent is defined as “parent,” and the –2nd great grandparent is defined as “self.”

Thank you. Definitely a cut-and-paste malfunction!