Calculate the day of the week you were born on – fake being an autistic savant!

maths Add comments

My friend and I were curious and we can now do the party trick of figuring out what day of the week a birthday falls on.

For the impatient, here’s the formula :

Birth Day Formula

Where d is the day, y is the last 2 digits of your birth year (throw away any remainder of the division) and mlookup is a lookup table :

Month Lookup Table

And the result is 0 = Sunday, 1 = Monday, etc

I was watching a show about Daniel Tammet, an autistic savant, and telling my friend Dave about it. One of the things that the media often focus on is how these savants can calculate the day you were born on.

I’ve always suspected that it can’t be that hard to do – there must be some formula for it – and I said so to Dave.

So we got curious and went to find the formula. Sure enough we found one.

At first it looked a bit long-winded. But after a bit of wrangling, we got it down to it’s bare essence with a couple of shortcuts (ie lookup tables in programmer-speak). Now we can do the calculations in our head. It’s still a bit of mental effort but nothing too onerous with a bit of practise.

We got the original formula from here :

And you can check your answers here :

Here is an example – 18th December 1977 gives

(18 + 2 + (10 * 76)/8 + 10 ) mod 7

A quick way of dividing by 8 is to divide in half 3 times, so 770/8 = 385/4 = 192/2 = 96.

18 + 2 + 96 + 10 = 126.

126 mod 7 = 0

So 18th December 1977 was a Sunday!

PS I’m in no way down-playing the abilities of savants – I think they’re amazing! Remembering this simple formula is one thing, doing calculations out to hundreds of decimal places or remembering what the weather was like on a specific date is quite another!

PPS The shortcuts we took only work for birthdays after 1900.

27 Responses to “Calculate the day of the week you were born on – fake being an autistic savant!”

  1. sara Says:

    what does mod 7 mean

  2. nev Says:

    Hi sara, mod 7 means divide the number by 7 and take the remainder. So for example, 36 mod 7 = 1. That’s because 7 goes in to 36 five times with 1 left over. ie 36 = 5×7 + 1. Another example is 14 mod 7 = 0, because 7 goes into 14 exactly twice with nothing left over.

  3. jebus Says:

    it doesnt work for today… 28, april 2008

  4. antwon Says:

    It looks like this formula will work for dates after 1999, but you can’t just take the last 2 digits, you must subtract 1900 from the year. So for 2001, your y value would not be 1, it would be 101. Nice post

  5. Carol Wellington Says:

    I can’t get this to work for 17/04/1977

  6. jdw Says:

    This is hit and miss, works for some dates, not for others.

  7. lorena Says:

    doesnt work for my birthay, it was a friday and according to this, it was a thursday

  8. nev Says:

    Hi lorena, what date is your birthday?

  9. nev Says:

    Hi Carol – for 17/4/1977, we put into the formula
    17 + 2 + (77 * 10)/8 – 10 (april lookup)
    770/8 = 96.25 = 96 (throw away remainder)
    17 + 2 + 96 – 10 = 105
    105 mod 7 = 0
    0 = sunday which is correct :

    Wow – that was when the Apple II was introduced!

  10. Paul B Says:

    It only appears to work for years that are odd (like 77). If you calculate using an even year, like 78, then it skips every-other day (ie: Sun, Tue, Thu, Sat).
    Anyone else seen this? I set it up in the computer to perform the calculations so I could just keep typing in the day, month and year. Works fine for odd years.

  11. zakhary Says:

    how can I use this formula for:2007..2oo6..2oo8..oo9

  12. Mark Says:

    Single digit days do not work with this formula….for example:
    Feb, 3 1988 Formula is as follows:
    3 + 2 + (88 * 10)/8 + 16 (feb lookup)
    880/8 = 110
    3 + 2 + 110 + 16 = 131
    131 mod 7 = 5
    5 = friday which is wrong I was born on wednesday to confirm I looked it up on computer calender.
    This formula only works for double digit dates.

  13. 24601 Says:

    Doesn’t work for me either, Jan 12 1978.
    12 + 2 + (10 * 78)/8 + 13
    14 + 780/8 + 13
    14 + 97 + 13 = 124
    124 mod 7 = 5
    5 = Friday
    I was born on a Thursday.

    I suspect your Day numbers are off, the calculator page you link to has 0=Saturday, 1=Sunday, etc. In that case it works.

  14. Lunk Says:

    “Here is an example – 18th December 1977 gives

    (18 + 2 + (10 * 76)/8 + 10 ) mod 7″

    shouldn’t it be
    77 instead of 76? or am I missing something

  15. bex Says:

    this doesn’t work
    I was born on 19 Jan 1988 and it says I was born on a Sunday. I was born on a Tuesday.

  16. earl Says:

    Note that January and February in there are attached to the previous year.

    My formula for months is simpler to remember and you subtract:

    for the 3rd, 5th and 7th month of the year it is the number of the month (negative), so -3 for March, -5 for May and -7 for July.

    For the even numbered months from June onwards it is the number of the month + 10.

    April is the same as July, September is the same as December and November the same as March.

    In a leap year January is the same as July (and April) and February is the same as August. Otherwise January equates with October and February with March (and November)

    Easier year formula is to divide the number of the year by 4 and add that to the year itself (subtracted from 1900). You can round it down to the nearest 28 to make it easier (so 1977 is 21 years on from 1956 and the current year 2010 is 26 years on from 1984. 2012 will be the next “base” year.

    Using all this Saturday is 0, Sunday is 1 etc.

    17 April 1977 is:
    17 for the date
    -7 for the month
    21 + 5 for the year.

    adds to 36 = 1 mod 7, thus Sunday.

  17. Athreya Says:


    At first let me convey, Blissful belated NEW YEAR Wishes.
    I heartfuly thank you and also appreciate for this wonderful formula. It is really amazing.

    But can you please help me with 14th feb 1981.
    Bcoz as per the formula it should be sunday, i believe, but in the calendar it is saturday.
    I am still confused how can we apply this to the leap year. can you please explain it with an example.

    That would be of great help.


  18. David Willis Says:

    Good article. I had some confusion with dates in January and February so I decided to re-derive the formula. This new formula is accurate and I believe it is faster too. (thanks to the tip from Earl about the years repeating every 28 years.)

    (d+y+y/4+mlookup) mod 7

    mlookup starting with January, is….
    you can use -1 instead of 6 or -2 instead of 5 if you prefer

    ‘d’ is still days, and ‘y’ is still years from 1900. Every 28 years the mod7 and /4 restart the years so you can use smaller numbers (i.e. for 1930, you can use y=30-28=2) Using this fact, when using this trick for friends around my age I make ‘y’ years from 1984 (1984=1900+28*3)
    For the y/4 you ignore any remainder. (i.e. 7/4=1).
    The one exception to the dates is that IF y is evenly divisible by 4, AND the month is January, or February, then you need to subtract 1 from your answer.
    As before, 0=Sunday, 1=Monday,….

    Test Oct 30, 2010, (note: I find it easier to mod the numbers before adding)
    y=2010-1984=26, Oct=0
    (30+26+6.5+0)mod7=(2+5+6)mod7=6 (Saturday, which is correct)

    Test Feb 24, 1920
    y=20, Feb=3
    (24+20+5+3)mod7=3 But since 20/4 has no remainder, and we are dealing with a month before Leap day, we subtract 1 and get 2 or Tuesday.

    This method works for dates from Jan 1,1901 to Dec 31 2099 as described. If you are interested in dates outside that range just look up the rule for leap years every 100 & 400 years and shift accordingly.
    Hope this helps.

  19. garth Says:

    Thanks, David. Your formula produces the correct result every time, and it’s so easy that for any date I can work out the day of the week in my head in just a few seconds.

  20. jhon Says:

    this formula sucks

  21. jose Says:

    it not true

  22. Scott Says:

    Read revisions. Not getting the correct day for March 22, 2000. Y=2000 is divisable by 4, but I shouldn’t have to -1 becuase after leap day. My numbers

    (22+00+00+3)mod7 = 4 I’m thinking the answer should be 3.

  23. Jacko Says:

    Just wanna clarify the top guy a little more.

    d + (last two digits of year) + [(last two digits of year)/4] divide this by 7 and the remainder will be the day in terms of 0 = Sunday and 6 = Saturday with the exception of:

    – leap year (if the year is evenly divisible by 4 and if it’s evenly divisible by 100 then it has to be evenly divisible by 400) in which case take 1 away from the answer/day

    – If above 2000 then take off 2000 and that’ll be your year digits

  24. Ramesh Says:

    What I want to find out is WHY this works, why every single piece of this equation is where it is. Anybody got a clue?

  25. Gabriel Says:

    guys this formula doesnt work for leap years

  26. Bek Says:

    Moron!!!! I trusted this and went into exam.
    This is wrong!!!!!

  27. Prakash Says:

    How to calculate 2/8/2008

Leave a Reply

You must be logged in to post a comment.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in
lanoxin accion farmacologica cappra viagra augmentin infezione dente farmaci generici tipo viagra levitra nebo cialis il viagra aiuta a durare di piu cipro forma di governo meclizine percocet harga voltaren gel 20gr cipro vacanze estate 2013 ziana gel vs. differin bactrim 16 compresse prezzo come smettere con cymbalta viagra dominicano cipro dizziness nausea voltaren gel 150 gr suizid durch seroquel cipro posti da visitare voli economici x cipro voltaren dispers test trental motilità rifampin isoniazid pyrazinamide ethambutol streptomycin prednisone in pericarditis acquista cialis on line motilium medicament interdit prednisolone acetate ophthalmic suspension usp en espanol volo fiumicino cipro propranolol a concor provera e periodo fertil dottor allegra dietologo lipitor plaque stabilization finasteride per ricrescita capelli venta viagra copiapo voltaren rapid 50 back pain remedio diovan valsartana prednisone contain sulfa ricetta torta frolla allegra finasteride generico argentina augmentin posologia bambini sciroppo lamisil ficha tecnica metoprolol guaifenesin interazione cialis e antibiotici posologia vermox bambini torta allegra prova del cuoco sinemet ed effetti collaterali generico do cialis no brasil notice du ventolin a cosa serve il viagra effetti collaterali assunzione cialis lisinopril 10 mg qualitest viagra scaduto controindicazioni voli pisa cipro augmentin bambini dosaggio 140 ml finasteride effluvio cronico viagra prezzi italia vermox è un veleno ventolin ile dawek dulcolax grossir viagra bula generico ginseng como viagra prednisolone performance sportive risperdal consta 100mg suprax per bambini levitra originale 20mg atrovent uso pediatrico rocaltrol in pregnancy prof allegra san giovanni posso provare il viagra dulcolax docusate sodium come si chiama l equivalente del viagra viagra ricetta obbligatoria voltaren massagestuhl augmentin effetti collaterali nausea ampicillin penicillinase cipro nord passaporto eczema triamcinolone acetonide ointment vacanze estate 2013 cipro dopo quanti giorni fa effetto vermox vacanze cipro pagina 1 metoclopramide qt interval sangue occulto nelle feci coumadin coumadin nell'insufficienza renale prezzo farmaco viagra betamethasone prednisone conversion cipro uti prescription chloramphenicol augensalbe trazodone molecule effetto cialis donne dividere compresse cialis principio ativo provera contrattura muscoril o voltaren prezzo fosamax 70 2 dulcolax suppositories voltaren gel ndc voltaren cream prices pressione alta gravidanza adalat tegretol uso pediatrico viagra corazon finasteride fa bene ai capelli augmentin e pillola loette medicamento genérico motilium concerta citalopram propranolol picaturi colchicine gloriosa superba allegra dicesare remedio propranolol 10mg cialis viamedic fungsi metoclopramide hcl 10mg depo provera in uae allegra gotas posologia metoprolol allaitement levitra composizione chimica crestor 5 mg posologia quantità di cialis da assumere viagra naturale aglio voltaren per dolori cervicali quando avere rapporti assumendo clomid medicina crestor rosuvastatina propranolol gegen trauma finasteride tumore prostata augmentin antibiotico sospensione comprare viagra per telefono precio del voltaren aerosol effetti collaterali della finasteride nelle donne paxil precio costa rica voltaren supposte per emicrania dose efficace viagra zovirax pediatrico suspension nimotop foglietto illustrativo asilo nido l allegra compagnia dei bambini laboratorio abilify viagra risco infarto tui allegra ausstattung voltaren o voltfast prometrium quando le mestruazioni chloramphenicol on lac operon doza ventolin copii la mucca allegra viterbo acquisto kamagra in italia prezzi immobili a cipro pastiglia sostitutiva coumadin voltaren 75 mg ampul fiyatı fitoterapico viagra natural antibiotico augmentin esposizione sole offerte cipro aprile avodart in farmacia voltaren e fastum gel medicamento crestor 5 mg cialis e aspirina insieme fungsi voltaren tablet perche il viagra costa cosi tanto perchè cialis non ha funzionato viagra natural en costa rica effetti collaterali di minocin cipro ricette zestril composizione farmaco cialis quanto costa tricor pesticide levitra generico funziona slovenia cipro pronostici differin crema per macchie quantiferon gold prednisolone finasteride e cancro alla prostata terapia ormonale con clomid elavil dog aggression zoloft dolori muscolari xenical effetti collaterali benicar hidroclorotiazida voltaren gel recall 2013 effetti collaterali decadron levitra mal di testa coumadin e succhi di frutta voltaren diclofenac zalf iperstimolazione da clomid danazol c1 inhibitor linha allegra dosaggio augmentin per bambini farmaco tenormin cosa serve zofran cost generic zoloft durante l'allattamento rocaltrol muadili levitra scaduto fa male offerte capodanno a cipro augmentin per streptococco gravidanza situazione politica cipro testo costituzione cipro sospensione di cymbalta triamcinolone acetonide vs clobetasol propionate minoxidil e propecia risultati voltaren resinat sport inderal attacchi panico abilify sciroppo scheda tecnica volo monaco cipro augmentin serve prescrizione medica cialis eruzioni cutanee benzac cicatrices isola di cipro superficie dose eccessiva lasix prednisolone 20 mg comprime orodispersible augmentin antibiotico streptococco colchicine emedicine bactrim e spermiogramma zovirax labiale istruzioni per quanto tempo bisogna prendere cymbalta medicine meclizine hcl augmentin doppia scatola a cosa serve il benzac barca allegra 3.70 usata foro de strattera cipro agosto all inclusive metoclopramide depression vermox prevenzione abilify somministrazione prednisone per sinusite il voltaren è mutuabile l'occupazione allegra propranolol salbe heilbronn voli piu hotel cipro levitra tutti giorni detrol la generic date perseo via cipro 56 atac metro cipro dulcolax e latte motilium suspension spc voltaren fiale scaduto pacchetti vacanza cipro agosto quante sono rimaste incinta con clomid thuoc voltaren emulgel antibiotico augmentin mal di stomaco dulcolax laxative pregnant augmentin compresse prezzo con ricetta viagra herbal prima setia cyclophosphamide mitoxantrone vincristine prednisone cipro sud mappa diflucan durante mestruazioni allegra caltagirone email augmentin fa male allo stomaco zocor 20 mg controindicazioni riccadonna allegra stockists iniezioni viagra collegamenti creta cipro depo provera 150 mg cost guanfacine and risperdal augmentin per denti quanti giorni ciwa protocol clonidine risperdal consta 12.5 quando torna il ciclo dopo dostinex differenza coumadin e sintrom ristorante giapponese zona cipro generico do cymbalta voltaren retard infarmed perche viagra costa tanto tegretol missed period proventil hfa espanol chloramphenicol maść zantac in gravidanza novartis voltaren gel shortage orlistat 120 posologia dipyridamole dissolution bactrim foglio illustrativo prendere cialis e levitra insieme exelon cerotto indicazioni significato di vedova allegra clopidogrel generico scheda tecnica premarin cavalle escitalopram canada generic promethazine potentiate codeine affitto auto cipro tifo cipro quali paesi viagra senza ricetta simili viagra senza ricetta xenical come si usa viagra care patient rote liste voltaren resinat triamcinolone acetonide cream on scalp augmentin senza ricetta prezzo escitalopram and valerian tour organizzati per cipro nizoral pomata indicazioni diflucan sospensione foglio illustrativo coumadin e frutta da evitare albendazole dose in cattle dove comprare dapoxetine associazione cardura catapresan seroquel rp 200 mg prezzo panelas allegra silicone tramontina viagra problemi cardiaci is strattera an maoi inhibitor sospensione coumadin per intervento ldip provera india bangalore merchandiser differenza tra voltaren e voltfast risperdal vidal contre indication effetto antabuse cefalosporine cymbalta commercial piano song apa fungsi cipro la tana allegra di carugate foto pillole di viagra risperdal consta pi clomid e iperstimolazione ovarica principio attivo di seroquel dolore al seno dopo clomid bactrim e alimenti coumadin e il caldo indicazioni bactrim antibiotico aldara 5 generico effetti di risperdal crestor eccipienti tegretol pagine sanitarie triamcinolone cream for psoriasis coumadin e capelli viagra generico feminino viagra per donne menopausa aciclovir porta sonnolenza metoprolol unam diltiazem farmacocinetica pdf cialis dopo scadenza paphos cipro divertimento trazodone persistent genital arousal disorder clomid si sarcina clomid effetti sull'uomo aciclovir doc generico benicar dizziness voltaren y lumbalgia quanto costano i cerotti di voltaren controindicazioni uso viagra video isola di cipro alesse estrogen progesterone differin gel ultrafarma aciclovir blocca varicella flomax modo di somministrazione temperatura cipro dicembre gennaio metoprolol ne ilacı cialis generico cos è norvasc ed allattamento usare cialis a 20 anni levitra masticabile clomid stomaco pieno viagra rosa in farmacia metoclopramide e loperamide etodolac sulfa allergy clomid per ovaio multifollicolare agriturismo cipro voltaren salbe preise inderal e disfunzione erettile viagra tempi di assunzione quanto costa il ventolin spray quanto dura effetto cialis 5 mg insulinresistenz pco metformin snai roma cipro voltaren e inzitan dapsone colchicine combivent pediatric dosage pronto soccorso cipro roma propranolol piyasa adı voli diretti da roma a cipro settore primario a cipro requip allucinazioni escitalopram provoca insomnio professor pasquale cipro neto presidenta voltaren gel hämatom augmentin per linfonodi ingrossati trazodone in india l amore ai tempi del viagra no tengo ventolin lamisil per funghi augmentin e latticini antibiotico augmentin fermenti lattici il viagra quanto tempo prima va preso seroquel rp scheda tecnica voltaren gel pret catena quante compresse ci sono in una scatola di augmentin voltaren gel liver damage voltaren indigestion nebivolol equivalent metoprolol confronto tra viagra cialis e levitra abilify farmaco mutuabile allegra d mobile coupon visitare cipro nord musico vedova allegra tegretol da sono alpitour cipro 2013 diovan ace inhibitor dulcolax pediatrico viagra spedizione 24 ore arret progressif risperdal albenza coupon augmentin test gravidanza cialis tra giovani provera precio venezuela informacion del medicamento risperdal cucine stosa allegra prezzi cialis sottobanco metoprolol contraindicatii aeroporto cipro turco compazine dose migraine zetia scheda tecnica allegra glatzer come si somministra il cialis meglio clomid o gonal f tomar generico do viagra casodex 50 controindicazioni differenza tra lisinopril e ramipril metropolitana di roma fermata cipro voltaren vs percocet settore terziario cipro seroquel e fibrillazione atriale zoloft fa male al cuore quando prendere lanoxin triamcinolone acetonide mupirocin voltaren salbe analthrombose rosuvastatin calcium logp lamisil 1 spray cutaneo soluzione si puo bere alcolici con il cialis impotenz durch cialis voltaren mtx bula do voltaren 50mg cialis dividere pillola aprire conto cipro allopurinol 300 gichtanfall rocaltrol hypercalcemia gente allegra il ciel chi prende cymbalta risperdal ampul voltaren e tachicardia revatio vs viagra cost risperdal et la grossesse allegra fattoria canzone cipro tour dell'isola pizzeria la luna allegra roma augmentin solo con ricetta clomid e test ovulazione positivo brolene vs chloramphenicol voltaren dispers 46.5 mg diflucan candida quanti giorni paphos cipro cosa vedere beste potenzmittel levitra cipro codeine trandate allaitement vytorin costo il dosaggio lasix per un cane prevacid solutab cost costo alli orlistat foto trattamento finasteride aciclovir odontologia ritalin in combinatie met paroxetine cipro for uti male cartina isola cipro il clomid fa gonfiare coumadin clinic glendale az elavil causing dizziness pizzeria allegra brigata ipertrofia prostatica cura con cialis viagra donne farmacia voli per cipro ryanair cipro trasporti pubblici farmacia germania voltaren schadet viagra potenz luoghi più belli di cipro albendazole constipation tricor fenofibrate generic prednisolone aspirine la vedova allegra trieste allegra d sudafed spine corrente cipro levitra pressione alta zoloft farmaco prezzo acquistare propecia on line cialis funziona poco cipro fiumi provera no period not pregnant cialis 20 mg generico finasteride farmaco prostata assuefazione al cialis tartarato metoprolol bula voltaren supposte dosaggio voltaren quando fa effetto lotrisone for tinea versicolor danazol composition voltaren gel canadian pharmacy co diovan lek voltaren emulgel prezzo farmacia is trazodone a serotonin inhibitor preco do viagra generico na ultrafarma voli genova cipro risperdal alcool effets secondaires dosaggio coumadin e inr immagini nicosia cipro moduretic tem generico viagra femenino santiago propecia inutile schizofrenia e abilify come calcolare la dose di augmentin miglior sito vendita viagra allegra ped posologia zoloft peggioramento sintomi prezzo viagra in romania cipro voli milano si puo' portare cialis in aereo lo yacht di tronchetti provera