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 :

http://www.tondering.dk/claus/cal/node3.html#SECTION00360000000000000000

And you can check your answers here :

http://homepages.rootsweb.com/~sdavnprt/bday.htm

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 :
    See http://en.wikipedia.org/wiki/1977

    Wow – that was when the Apple II was introduced!
    http://www.applematters.com/article/april-17-1977-apple-ii-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:

    HI,

    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.

    Athreya.
    Cinematographer.

  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….
    0,3,3,6,1,4,6,2,5,0,3,5
    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

    (d+y+y/4+mlookup)mod7
    (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
forum femminile viagra arti nama bayi allegra levitra sordità quanto dura con il viagra clomid zonder controle gynaecoloog diovan 80 mg generic anafranil ritardante voltaren retard tendinitis diovan vs co-diovan canzone sull'amicizia allegra thuốc boi voltaren cuanto vale el viagra original viagra et ulcere viagra cuanto sale argentina rheuma voltaren gel zoloft inizio efficacia flora di cipro acquisto cialis generico line voltaren resinat sperma aglio e coumadin triamcinolone acetonide ears dove acquistare levitra online tempo di durata del cialis notizie di cipro diovan generic date 2013 usare viagra prima volta quanto cialis si puo prendere wann risperdal voltaren rapid 25mg cena allegra 120 precio argentina alimenti da assumere con coumadin metformina con provera finpecia cipla price in india questa allegra gioventù download allegra carmine viagra pil met alcohol seroquel farmacodinamia augmentin disfunzione erettile prezzo micardis 80 mg centri ovodonazione cipro vermox senza glutine viagra 1 szt voltaren gel lateral epicondylitis crisi cipro russia nizoral shampoo per pitiriasi versicolor nitrofurantoin glaucoma augmentin dopo i pasti viagra radio carlos avapro fda approval cipro ufficio turistico mix voltaren ibuprofen allegra pazienti la vedova allegra mestre propecia è sicuro chlorothiazide lasix trazodone lcms ventolin eccipienti tegretol pediatric dose viagra vs sildenafil generico voltaren london drugs quanto costa il farmaco dostinex equivalente al viagra natural trazodone components association leponex risperdal cytotec quito costo metoprolol dosis hipertension co diovan muadil dilantin for seizure control adalat crono effetti indesiderati propecia serve la ricetta controindicazioni del femara proventil bronchodilator triamcinolone acetonide cream in ears metoprolol succinate er splitting mal di schiena lombare voltaren diflucan 2 pastiglie propecia cancro prostata effet viagra 25mg viagra con marihuana yasminelle e antibiotico augmentin metoprolol succinate nih bula generico do viagra alternative naturali al clomid propecia come agisce dove acquistare nizoral appartamenti vacanze cipro captopril e viagra finasteride fa ricrescere capelli risperdal ve cipralex ciprofloxacin chronische prostatitis ranolazine metoprolol come prendere augmentin bustine propecia blocca la caduta generico adalat retard triamcinolone carpal tunnel voltaren pomata allattamento harga viagra di indonesia clima cipro del nord la citta piu bella di cipro allegra riggio twitter fibromialgia voltaren coumadin alimentazione corretta diovan valsartan generic forum al maschile viagra sale nero di cipro wiki valtrex precio chile cialis acquistare in farmacia differin dermatologista come si prende diflucan methotrexate e caduta dei capelli vorteile cialis cipro in quale nazione viagra sonrası allopurinol pensa viagra come acquistarlo si puo prendere il viagra con l'ipertensione il prednisone a rilascio modificato deve essere assunto la sera diflucan bruciore di stomaco effetto collaterale del viagra tenormin italiano coumadin erezione risperdal et diabète propranolol hcl er caps 60mg a quoi sert le zantac 300 si puo prendere il cialis con la pressione alta voltaren spray gel seroquel rp effetti collaterali moduretic sovradosaggio voltaren pour tendinite carrozzeria via cipro genova video flessioni viagra augmentin necrotizing enterocolitis motilium sciroppo per bambini prezzo di dostinex cipro saw palmetto alternatives to cipro antibiotic effet secondaire viagra 50 si può prendere il diflucan in gravidanza arimidex e tunnel carpale arava immunosuppression danazol urticaria qualche canzone allegra perdita capelli finasteride hotel cipro lido di venezia procardia 10 mg cost effetti collaterali del clomid forum nexium 80 mg al giorno viagra generico barata nitrofurantoin fluoroquinolone cofetaria amaretto calan dosage trazodone depression cipro offerta vacanze cialis 10 mg cpr pellic come ottenere viagra senza ricetta metoprolol varices colchicine dispert nedir differenza tra clopidogrel e ticagrelor medicamento voltaren bula antimicotico orale diflucan è meglio il viagra il cialis o il levitra rocaltrol 0.25 vidal cialis vendita in italia ingredienti del viagra indication zovirax varicelle assumere cialis scaduto monitoraggio follicolare con clomid fuoco di sant'antonio aciclovir anafranil dopo quanto tempo fa effetto propranolol doseamento differenza tra plavix ed efient aciclovir bambini prezzo voltaren dispers 45 cipro del nord spiagge cipro vacanza novembre aereo pisa cipro come funziona il cialis evista generic price medicament zoloft 50mg voltaren street value viagra und sperma cucina lube modello allegra cialis lizenzablauf appunti di viaggio cipro ciprofloxacin difficile juro pro allegra ανταλλακτικα allegra mazzola ask dove posso trovare cialis generico voltaren emulgel vente libre escitalopram funziona dove comprare viagra in slovenia stipendio medio cipro intravitreal triamcinolone acetonide dose voltaren chez le chien equivalenza metilprednisolone e prednisone voltaren fotosensibilizzazione prix viagra allemagne aeroporto cipro grecia voltaren tabletten und sport tegretol e vertigini vantin antibiotic cost mentina al viagra precio ventolin farmacia posologia decadron infantil alternativa al viagra senza ricetta medica zoloft 50 fa ingrassare augmentin sospensione scheda tecnica quale farmaco sostituisce il viagra lasix effetti indesiderati allegra noir allegra metropol grohe pronto soccorso oculistico roma cipro quanto costa vivere a cipro clomid gonasi e progesterone funziona ristoranti zona via cipro roma allegra rangoni machiavelli presidente della repubblica di cipro motilium durata tratament orlistat venta peru dove comprare il viagra in farmacia unterschied viagra levitra cialis come si puo prendere il viagra voltaren e distorsioni donde venden viagra chile prezzo del generico del viagra viagra sickipedia aciclovir comprimate antibiotic propranolol petechiae voltaren ec 75 mg metoprolol posologia triamcinolone acetonide cream 1 use viagra signification levitra costos www.cipro.gov.za deregistration voltaren ilacpedia tachicardia e levitra zoloft prescrizione medica nizoral sampon sarcina augmentin generico costo altiva e allegra medicament zoloft 25 mg allegra brigata viale marche milano sonora dinamita el viagra no se si aborte con cytotec costo arcoxia 120 mg prelievo coumadin a digiuno ilenia alesse cialis 5 mg.e ipertensione lasix dove agisce comprare cialis senza ricetta in farmacia abilify sedazione vytorin generico mexico wellbutrin scheda tecnica clomid provames ovitrelle duphaston mosaico bisazza cipro perioral dermatitis zovirax chi ha usato il cialis generico vodafone via cipro roma rischi coumadin nice guidelines dipyridamole aspirin dilantin personality propranolol comprimido bula olanzapine po to im conversion ciclo anovulatorio con clomid aquaphilic triamcinolone triamcinolone acetonide lsb lehar vedova allegra tace il labbro allopurinol en colchicine viagra allo mam mp3 sovradosaggio cialis voltaren pastile 75 mg allegra turismo santos cialis mezza pasticca voltaren salbe ischias quanto valgono 2 euro di cipro quando scade il brevetto viagra qui vend du viagra recensioni cialis 5 mg strattera und equasym effetti collaterali finasteride 5 mg zyprexa sintomi da sospensione rosuvastatin calcium price in india allegra staffing ontario ca dopo quanto agisce clomid nsar voltaren resinat propranolol cavernoma cuanto dura uno con viagra cipro clima inverno kamagra nelle farmacie italiane levitra con hipertension finasteride 1 mg precio chile diovan sintomas risperdal de 3 mg feldene crema costo viagra da 10 mg voltaren gel price at walmart dostinex e sintomi gravidanza zyrtec pollenallergi xeloda radiation cholangiocarcinoma zofran fda approval date voltaren dispers 45 mg relafen 750 mg contiene aspirina crestor 5 mg controindicazioni sostituto naturale del cialis prezzo ufficiale del cialis levitra pagamento postepay risperdal schizophrenie vaistai differin cialis e pressione sanguigna meglio zovirax o compeed abilify 5 mg effetti indesiderati arreter le lipitor aciclovir pastiglie posologia costo viagra 50 comprare viagra in ungheria medicamento allegra formula allegra le rolland aciclovir sovradosaggio voltaren period cramps viagra senza ricetta londra propranolol cyp2d6 meclizine neurontin risperdal 1 mg fiyati voltaren toronto star risperdal posologia bambini apertura grotta remeron resistenz gegen aciclovir colchicine diarrhea imodium prometrium questions benzac per brufoli voltaren gel ematoma avete mai usato il viagra come smettere con lo zoloft claritin si sarcina farmacia guadalajara orlistat finasteride farmacovigilanza hansgrohe allegra sportive quante volte mettere voltaren canzone allegra da mettere in un video fratelli allegra furci siculo bactrim trimetoprima con sulfametoxazol depo provera pricing allegra na alergię cena medicina vytorin 10/20 bissulfato de clopidogrel legrand augmentin post estrazione dente quanto costa noleggiare una macchina a cipro la vita allegra roswell ga costo confezione di cialis viagra cega lasix 25 mg dosaggio allergia antibiotico augmentin bambini voltaren muscoril in allattamento trazodone claritin bicicletas allegra chile strattera plus ritalin viagra costo a confezione infant dulcolax suppositories augmentin bambini posologia sciroppo voltaren gocce oftalmiche aciclovir pediatrico suspension dosis cerotto voltaren costo nuovo farmaco sostitutivo coumadin voltaren og ibux test gravidanza dopo prometrium prezzo viagra online voltaren da taquicardia berlusconi usa il viagra potassium diovan viagra chino huang he precio allegra ou solar tramontina siti archeologici cipro differin gel non funziona voltaren gel creatine cialis 20 mg quando si prende allegra gucci si sposa esposizione al sole dopo augmentin alberghi protaras cipro voltaren compresse con ricetta voli cipro milano voltaren renal colic cetirizine allegra risperdal consta toedienen inderal eccipienti metoprolol to lopressor conversion prochlorperazine and zoloft cost voltaren gel generico de diovan 160 levitra cialis viagra prezzi depo provera birth control cost diclofenac voltaren 1 gel cipro consultor imobiliario quando va preso il levitra quando si ovula con il clomid voltaren ne ilaci acquistare viagra su internet risperdal fiala viagra generico pagamento postepay voltaren dolo bevont tabletta tegretol-cr 200 mg divitab compagnia allegra gmbh aldara acquisto voltaren resinat 150 problemi di erezione cialis is losartan generic for diovan viagra $25 per pill differenze tra aciclovir e zovirax voltaren 100 fiyat distributori automatici di viagra principio attivo del bactrim biovail cardizem cd come usare il levitra scuola via cipro milano voltaren gel groin pull viagra son effet strattera and vyvanse combination triamcinolone 0.1 cream poison ivy escitalopram cvz acquistare cialis dall'europa triamcinolone acetonide cream 0.1 psoriasis indocin ulcerative colitis depo provera in mice il ventolin in gravidanza diflucan sospensione bugiardino voltaren dolo filmtabletten association chibro proscar xatral allegra scarpe milano augmentin fiche medicament voltaren dolo forte gel consigli per l'uso del cialis cerazette und clindamycin battaglia salamina cipro negozio allegra unione cialis chi l'ha usato lariam posologie.vidal cialis acquisto farmacia orlistat meccanismo d'azione microgynon si augmentin tinidazole 500 mg posologie clomid e follicoli troppo grandi aripiprazole and escitalopram metoprolol succ er 831 tartarato x succinato de metoprolol cialis farmaco costo renagel calcium pastilla china viagra allegra uso terapeutico pamelor 25mg da sono motilium suppositories dosage levitra 10 mg come si usa promethazine codeine pediatric dose minocycline non generic viagra di ultima generazione finasteride da problemi sessuali apertura conto corrente a cipro dulcolax pico perles boots voltaren and ativan invega sustenna compared to risperdal consta seroquel prolong und tavor navigatore satellitare cipro compare metformin to gliclazide interazioni tachipirina e coumadin come agisce il remeron albenza pills chi dinh cua olanzapine che cos'è il nexium levitra da dipendenza contraindicatii augmentin 1g cipro euro moneta avodart 0 5 mg generico per quanti giorni si prende augmentin vita allegra roermond serophene aumenta o ciclo usare cialis fa male albendazole drench mirtazapine citalopram combination risperdal consta annual sales quinapril hydrochlorothiazide dosage posizione geografica isola di cipro prospecto voltaren 50 mg cialis 10 mg dopo quanto fa effetto schema assunzione coumadin danni del viagra cipro norvegia risultato nitrofurantoin in uti prophylaxis voltaren or diclofenac tricor capital partners meglio seroquel o zyprexa propranolol cena 2012 arimidex ritenzione idrica tegretol interazioni farmacologiche voltaren rapid rcm folheto informativo voltaren rapid 50 mg arcoxia 90 antinfiammatorio stress incontinence detrol ciaza po depo provera augmentin prezzo mutuabile conquista ottomana di cipro risperdal consta conversion to po singulair dopo quanto fa effetto