While there are probably many genes and lifestyle choices that will affect your longevity, there is one gene, FOX03, that has been identified as a major contributor to having a long life by a number of prominent scientists (click here for the abstract at NIH). I first heard about it when reading (or rather listening to) the book Lifespan by David A Sinclair.
Having at least one C instead of a T in the FOX03 gene at location RS2764264 is associated with longevity. So of course I had to look it up in my DNA and that of my family. This is easy to do if you are tested at 23andme. If you have tested elsewhere you need to download the raw data from your DNA test and search it in a text editor or spreadsheet program.
At 23andme, click on your name or image at the top right of the page to get a menu that includes the words Browse Raw Data. Click that option. The next page has a white box where you can type in the name of a gene or SNP. In this case type RS2764264 and see something like the following:
I have highlighted the C/T for this lucky relative of mine who has one copy of the base pair associated with longevity. Some of my relatives have two Cs, but many others, like poor old me, have two Ts.
To find this SNP in your Ancestry DNA raw data that you have downloaded, you need to open it in a program that can handle a large file. Some text editors can do that, but I prefer to use a spreadsheet program and tell it that the data is tab delimited. This same technique will work for wherever you have tested your DNA, provided this SNP is included in the results. At least one of my cousins did not have this SNP in his Ancestry data, perhaps due to an older version of the test.