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
cialis e mal di testa concerta citalopram decadron in palliative care triamcinolone acetonide cream poison sumac dove si trova viagra augmentin può causare emorroidi generico do cymbalta bactrim 80 mg sospensione orale aciclovir lattanti champagne jacquart cuvee allegra 2004 tifo cipro dopo quanto tempo si rimane incinta con clomid risperdal flas bucodispersable 1 prednisone dose for pericarditis voltaren patch le prix voltaren čepići 25 mg periactin con clusivol viagra cialis levitra confronto prezzo lincocin trazodone alcohol liver tardive dystonia abilify differenze tra zoloft e prozac solo affitti roma cipro compazine dose migraine strattera 60 mg preis clima a cipro ad ottobre aerosol ventoline atrovent pulmicort triamcinolone acetonide and eczema trazodone p-glycoprotein augmentin compresse dosaggio bambini seroquel stillzeit viagra natural femenino chile quali sono gli ingredienti del viagra galega officinalis metformin augmentin antibiotico faringite clozaril generic name moduretic compresse prezzo via cipro 104 roma harga risperdal consta prometrium secondo trimestre di gravidanza danazol y purpura trombocitopenica idiopatica voltaren osteo cream clomid e colica voltaren compresse 100 mg indicazioni differenza tra acyclovir or zovirax cipro e' nell'euro serve la ricetta medica per il diflucan detrol la generic date depo provera muscle deterioration coltrax voltaren dosis allegra d quantity aldara crema efficace diclofenac (cambia cataflam voltaren) voltaren gel grams lasix meccanismo azione probabili formazioni norvegia cipro risperidone ocd augmentation ciprofloxacin pille leios meglio lamictal o depakin depo provera ulcerative colitis naltrexone cloridrato effetti collaterali motilium contre indication vacanze a cipro dicembre provera effet secondaire cipro nitrofurantoin viagra e arginina norvasc ed allattamento cipro diazepam voltaren zetpil 100 mg cialis 5 mg non funziona nolvadex composizione triamcinolone acetonide cream in spanish tupperware linea allegra aciclovir pastile cat costa prezzo dulcolax compresse lasix tempo di azione depo provera costo colombia provera regimen il generico del viagra a che eta si prende il viagra poesia allegra famosa cyclophosphamide mitoxantrone vincristine prednisone dosage du risperdal famotidine ranitidine pregnancy ventolin farmaco da banco antibiotico augmentin fermenti lattici in quanto tempo fa effetto propecia desinflamatorios voltaren voltaren pasticche posologia vacanze isola di cipro aciclovir fa male allo stomaco inderal compresse costo dosage risperdal gouttes battaglia di salamina di cipro diflucan 150 mg dosaggio augmentin 70 ml prezzo carvedilol conversion metoprolol voltaren supposte dosaggio levonorgestrel contiene aspirina cipro è nell'ue cefacilina 500 cefadroxil montpellier tricyclische antidepressiva paroxetine cipro trasporti pubblici augmentin bambini dose ml topamax compresse effetti collaterali olanzapine effet secondaire seroquel tempi di efficacia quanto costa augmentin bustine voltaren gel barn acquistare avodart camper ci cipro 2 ci international cipro 25 ho provato viagra does voltaren have penicillin allegra clinica odontologica df voltaren gel rs viagra abbau nizoral pomata indicazioni cialis per cosa si usa tempi di azione del viagra ludoteca via cipro roma bactrim e stafilococco aureo orario posta via cipro brescia proscar ricetta bianca meteo cipro in aprile coumadin 5 prezzo adalat e piedi gonfi offerta viaggi a cipro spiaggia nissi beach cipro la vedova allegra yahoo am i allergic to cipro cisti ovariche dopo clomid viagra cialis levitra generico nitrofurantoin fluorescence questione economica di cipro contre indication prise viagra svizzera cipro calcio il nuovo levitra augmentin granulare bambini come comprare il viagra online voltaren in pill form bactrim antibiotico costo occupazione turca cipro dostinex periodo refrattario motrin pediatrico pipeta strattera ilaç fiyat medicamento cytotec misoprostol arcoxia durata trattamento comprare accutane cipro sun poisoning costo famvir 250 mg clomid dolori ovulazione xenical generico costo clopidogrel 75 posologia zestoretic pill color tegretol foglietto illustrativo cipro uti prescription viagra nach prostataoperation clomid e stick persona diflucan confezione ho preso il cialis ma non funziona dose efficace zoloft prezzo benzac ac 5 chi a provato il cialis ventolin espettorante prezzo il cialis aumenta la libido dosaggio augmentin per bambini allegra roberti nota 75 viagra amantadine and influenza vaccine voltaren stomach ulcer allegra lategan viagra 25 mg costo augmentin per raffreddore gatti allegra trio arpeggione se il clomid non funziona cosa fare viagra scaduto controindicazioni lincocin 600 intramuscolo le meridien limassol spa resort cipro zoloft causa impotenza dove e come acquistare viagra bissulfato de clopidogrel posologia augmentin fa bene per il mal di gola risperdal consta deltoide cucine stosa allegra colori nolvadex 20 mg prezzo che cos e il levitra diltiazem farmacocinetica pdf vampate di calore dopo clomid provera stanja racuna societe provera sen pergotime sterile triamcinolone acetonide suspension usp voltaren bant chloramphenicol resistant e. coli strain colchicine gloriosa superba propranolol traumatisme orlistat pillole dimagranti voltaren gel package size augmentin pediatrico indicaciones lyrica vs neurontin cost diflucan tempo effetto motilium domperidone sciroppo prandin generic launch come applicare voltaren emulgel clopidogrel dell'ictus tripadvisor spiagge cipro cipro europa luoghi di interesse propecia spermien differenza tra zovirax e vectavir definicion del medicamento propranolol sustituto del voltaren bactrim e spermiogramma finpecia efficacia tupperware allegra 1 5l flomax mal di gola prezzo assuefazione da zoloft voltaren mod smerter vendita viagra in croazia uso prolungato augmentin voltaren per cistite augmentin ci vuole la ricetta intossicazione da metoclopramide estrogen dominance alesse ingorgo mammario augmentin viagra dolore muscolare mestinon autonomic neuropathy aciclovir crema e pillola anticoncezionale flomax modo di somministrazione quanto costa levitra 10 mg orosolubile miglior cialis generico adalat crono 30 in gravidanza cipro pediatric dosing adalat nome generico viagra cialis levitra preise voltaren per torcicollo che differenza ce tra il viagra e il cialis lariam profilassi bambini costo noleggio scooter cipro triamcinolone acetonide cream alternative cialis viamedic lasix prima o dopo i pasti streptococco resistente augmentin voltaren crema bugiardino viagra per un cardiopatico tabella alimenti per coumadin giovanni ii di cipro siti sicuri dove comprare cialis generico viagra feminin diva sergio paolo cipro pompa al baclofen riabilitazione ranitidine and escitalopram bactrim forte per mal di gola provera sati ptt aciclovir bambini stomatite strattera slow cognitive tempo feldene sl bula posologia augmentin a che cosa serve voltaren dispers test voltaren ramipril treanda allopurinol cialis 2 5 mg prezzo dosi consigliate per viagra viagra canottaggio costo viagra cialis levitra non diabetic metformin voltaren opiat farmacie online vendita viagra promethazine codeine colombia il diflucan è mutuabile cialis e giovani medicamentos strattera cipro antibiotic calcium risperdal alcool effets secondaires voltaren fast allopurinol purispec grotta del remeron varese qual o generico de zoloft off depo provera no period dottor allegra dietologo colchicine in acute pericarditis nejm quando scade il brevetto levitra isoptin medicinale è possibile comprare il viagra senza ricetta nuova opel allegra cuscuzeira inox allegra tramontina diflucan stomaco pieno voltaren fascia c tratamento cistite pyridium per comprare il viagra occorre la ricetta clozaril monitoring canada clomid e gonasi ritardo del ciclo pizzaria provera belo horizonte interazione farmaci con coumadin provera 5mg induce period alberghi a cipro qual generico do arcoxia vendita cialis pagamento paypal u-triamcinolone-g clomid funziona cosa serve bula medicamento allegra pediatrico ercan cipro mappa voltaren tab 75mg forum effet secondaire lamictal agenzia viaggi roma via cipro viagra de vanzare in timisoara presidente golf albenza motilium causa sono lancia allegra 4.30 estrace suppositories principali città di cipro allegra e alessandra gucci rosuvastatin pravastatin conversion dopo quanto ovulazione con clomid prefisso telefonico internazionale cipro risperdal e demenza allegra nespoli voltaren y lumbalgia cozi pasta tramontina allegra ginseng como viagra valor comercial viagra chile viagra nel latte pacchetti vacanza cipro agosto arcoxia anti inflammatoire augmentin medicinali equivalenti voltaren fiale opinioni cialis prostata infiammazione prozac citalopram differenze a cosa serve il farmaco cardura risperdal consta 100mg efficacité du risperdal farmacocinetica y farmacodinamia aciclovir quanto costa abilify personaggi celebri di cipro canzone allegra estate propranolol inderalici augmentin bambini nel latte cialis 20 mg generico come si chiama il cialis generico augmentin sciroppo 140 mg medicament tegretol 200 voltaren prices us cisti dopo clomid rome metro cipro viagra e sport finasteride e minoxidil risultati foto voltaren e muscoril per nervo sciatico clomid tre pastiglie voltaren dolo unguento metoprolol er scored strattera 10 mg preis provera detiene el periodo tretinoin hydroquinone fluocinolone voltaren pomata foglio illustrativo ciclo corto con clomid cibi che sostituiscono viagra 100 mg di augmentin quanti ml sono effet secondaire medicament plavix voltaren gel plastic wrap cialis one day funziona vermox e bambini clomid effetti sull'uomo a quoi sert le bactrim forte cipro dizziness nausea comprare viagra cialis levitra voltaren gel morbus crohn augmentin amoxicillina acido clavulanico in gravidanza finasteride provoca caduta indotta vino rosso viagra hydroquinone 4 tretinoin 0.05 and fluocinolone acetonide 0.01 consilieri locali calan allegra d não da sono mizzoni artane trazodone 50 mg pregnancy doza ventolin copii cipro bancomat orlistat con l carnitina precio dove si trova geograficamente cipro strattera und pille pomata simile al voltaren topamax sonnolenza diovan 80 mg ne ilacı cozaar testosterone remedio orlistat ultrafarma voltaren mazilo cena provera przy menopauzie cipro and giardiasis la mucca allegra viterbo inderal e disfunzione erettile cos'è il femara viagra a chi non serve metoprolol succ tab 100mg er volo fiumicino cipro risperdal et la grossesse cosa vedere e fare cipro singulair effetti collaterali come assumere minocin intranasal triamcinolone acetonide metoclopramide sciroppo aricept 5 10 mg effetti proscar foglio illustrativo cardura 4 mg controindicazioni vacanze cipro aprile 2014 benzac clean prezzo clomid da quale giorno crestor e gravidez bateria tramontina allegra a quoi sert prednisolone mylan viagra che dose cipro è in grecia voltaren va bene per lividi viva viagra commercial propranolol tocris levitra e cardiopatie la ce farmacii gasesc viagra costo del viagra en lima diovan sanego aciclovir pomata prezzi augmentin da 1 gr prezzo metoprolol bei stress negozio celiachia roma via cipro tegretol da sono differin gel ultrafarma schizofrenia e abilify dulcolax picosulfato de sodio dulcolax pedia suppository viagra bei angina pectoris zofran a cosa serve turisti per caso cipro bella vacanza cipro allegra carotti accuretic quinapril hcl hydrochlorothiazide maxalt foglietto illustrativo herpes genitale aciclovir posologia prezzi in farmacia del viagra voltaren gel depressione allegra cipro a quale nazione appartiene triamcinolone inhaler discontinued meglio cipralex o cymbalta flo pred prednisolone acetate oral suspension fattura da cipro cipro escitalopram no more panic ristorante la pecora allegra via di capannelle efficacia levitra 5 mg parrocchia albenza strattera og ritalin migliori siti per acquistare viagra actonel ed estrazioni dentarie wellbutrin e sonnolenza dove acquistare viagra on line sospensione finasteride e risultati caduta capelli allegra pediatrico 60ml preço dipyridamole scintigraphie risperdal vida media alimentazione in terapia coumadin allegra biggs lubrano comet trial carvedilol metoprolol corticosteroid triamcinolone acetonide cream albendazole dose in cattle viagra nell'ipertensione polmonare doxycycline e coli sensitivity bronchite asmatica ventolin metoprolol blogg zoloft sintomi da sospensione augmentin e amoxicillina sono la stessa cosa pele commercial viagra negozio allegra roma compazine prolong qt casa allegra cannaregio sintomi astinenza anafranil voltaren retard grageas 100mg escitalopram pi grotte del remeron comerio affitto auto a cipro farmacologia del etodolac adalat crono gonfiore risque arret risperdal aciclovir richet restaurant pizzeria allegra mannheim a cosa serve voltaren retard trandate effet secondaire zoloft antidepressivo triciclico zyrtec farmaco generico augmentin polvere posologia trental 400 indicazioni durata effetto viagra 100 mg commenti su cialis 20 mg paxil diverticulitis caravan international cipro 2 escitalopram identifier dosaggio cialis 10 mg benzonatate motrin pharmacophore propranolol nome cialis generico offerte capodanno a cipro vad risperdal consta depo provera cramps but no period lisinopril consulta ogni quanto si prende il cialis tour organizzati per cipro