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
cymbalta dopo cena prometrium intrauterine insemination furosemide effetti doping voltaren fl im augmentin si puo prendere gravidanza rocaltrol dosage administration voltaren nesselsucht clomid porta ritardo ciclo clomid e ritardo voli diretti per cipro dall'italia interazione tra coumadin e cortisone alternatives to diovan generic eucerin triamcinolone provera libido glibenclamide metformin combination reminyl rilascio prolungato costo del cialis francia dove acquistare kamagra online lioresal foglietto illustrativo foro viagra generica dutasteride e fertilità allegra sao paulo diflucan una sola compressa prochlorperazine phenergan il viagra d'abruzzo strattera y metilfenidato voltaren eof serve la ricetta per cialis metoprolol durata tratament almea viagra naturale posologia prednisolone cane seroquel provoca sonnolenza si può usare il ventolin in gravidanza nitrofurantoin suspension spc cosa serve cialis 20 mg augmentin va bene per i gatti actonel è un bifosfonato propranolol salivation costo cialis in svizzera moneta corrente di cipro acquisto cialis senza ricetta in farmacia farmacologia de nexium nome generico do nizoral la gente allegra il ciel l'aiuta voltaren mazilo conversion lyrica neurontin viagra italia senza ricetta cartina mediterraneo cipro assunzione di dostinex in gravidanza voltaren forte ili rapid mirtazapin und seroquel cialis quando si prende colchicine spermatogenese tegretol bipolar pregnancy prometrium progesterone cream viagra farmacie bucuresti voltaren creme et allaitement viagra sinnvoll cialis a che cosa serve l allegra brigata viale marche levitra effetti collaterali cuore naltrexone dea classification aciclovir qual laboratorio orlistat generico colombia nizoral shampoo guardian singapore zoloft e sonno ventolin sciroppo effetti collaterali voltaren 75 mg cena aciclovir genericon 5 creme interaccion medicamentosa del diltiazem diflucan 150 a cosa serve voltaren gel safe dogs albendazole drug resistance cialis e il cuore principio ativo micardis trazodone discontinuation taper lasix grupo farmacologico triamcinolone dental paste taro remeron generic cost lasix e aumento creatinina effetti collaterali di topamax dulcolax istruzioni diflucan ed esposizione al sole voltaren 50 mg amning zyprexa aggressivität voltaren gel sprained wrist voltaren peligros trazodone qualitest zovirax compresse funziona augmentin antibiotico dosaggio bambini la vedova allegra lehar effetti di voltaren e muscoril harga pil cytotec di indonesia cosa serve farmaco cymbalta allegra spa santa rosa ca cialis e occhi rossi chloramphenicol staphylococcus epidermidis effetti del minocin cipro agosto 2013 allegra d generico preço propecia 40 anni viagra naturale del marocco diflucan vendita online portò cipro all'indipendenza cipla finpecia price in india trazodone dexedrine loratadina con aciclovir dieta per cura coumadin esiste un alternativa naturale al viagra cialis diario prostata tofranil cloridrato de imipramina 25mg siringa voltaren e muscoril gia allopurinol come si prende il kamagra coumadin alimentazione frutta voltaren and ivf cerati cocaina viagra voltaren emulgel for sciatica cilostazol e viagra bugiardino voltaren 100 mg decadron bambini quando cominciare il clomid triamcinolone cream grams medicare d viagra naltrexone for depersonalization disorder adalat durante allattamento alternativen zu risperdal cipro nicosia foto zoloft gravidanza rischi crestor effetti indesiderati diovan no generic viagra causa cancer lincocin farmaco voltaren mazi autonoleggio auto cipro piano terapeutico per arava ampicillin bei prostatitis viagra effetti forum spiriva o atrovent generic propecia proscalpin metabolismo del propranolol generic zestoretic fungsi provera 100mg costo cialis generico mexico honda benicar rio preto sp lamisil for tinea versicolor musica allegra con pianoforte co diovan forte 160mg/25mg modalità di assunzione del cialis metformina e glimepiride augmentin antibiotico ricetta finasteride e problemi di erezione nom commercial prednisone levitra 10 mg originale prezzo triamcinolone in dogs medicamento allegra pediatrico preço cipro debito pubblico coumadin alimenti vietati aciclovir nell'insufficienza renale voltaren shoppers magnesium cipro tendonitis costa allegra fincantieri augmentin antibiotico infezioni ginecologiche cymbalta somatizzazioni augmentin fa passare il dolore colchicine grossesse angiome propranolol prehypertension lisinopril ampicillin gg851 capsule uso di ventolin in gravidanza bahaya voltaren cosa conviene comprare a cipro come funziona vermox compra viagra online chile viagra in casa triamcinolone cream aristocort noleggio auto cipro sud metoclopramide iv compatibility nizoral crema sui capelli crestor e sinvastatina il sole scotta cipro orlistat 120 mg laboratorio colmed international augmentin per stafilococco aureo clomid tentativi diflucan 100 effetti collaterali frasi simpatiche sul viagra prometrium uso orale in gravidanza voltaren forte yliannostus levitra 5 mg durata cipro peritoneal dialysis dosing placche gola augmentin quanti giorni arimidex senza piano terapeutico dulcolax suppository dissolve aciclovir previene la varicella voltaren salbe ersatz dosaggio augmentin per cani zovirax labiale e gravidanza tutte le città di cipro cefadroxil peritoneal dialysis perchè cipro è in crisi antibiótico e viagra voltaren colirio prospecto maxalt funziona rossi allegra marilia sp incinta dopo sospensione clomid levitra generico farmacia italiana cipro francese diovan faq proventil sizes clomid causa ritenzione idrica alimenti sconsigliati coumadin nitrofurantoin oral suspension price metoprolol inferior mi escitalopram ginseng chloramphenicol/beclomethasone dipropionate/clotrimazole/lignocaine hcl risperdal e doc coumadin e sudorazione vermox sciroppo gatti ventolin ai neonati viagra dba bere alcolici sotto augmentin percentuale gravidanze con clomid crestor 10 mg costo diflucan compresse foglio illustrativo aciclovir i.v. bei niereninsuffizienz panotile cipro test risperdal consta effet indesirable amici allegra riederalp aciclovir pomata bambini trental 400 infertilità confronto prezzi viagra cialis lasix utilizzo triamcinolone acetonide alternatives remedio allegra infantil 6 mg clomid dal 2 giorno controindicazioni per augmentin chloramphenicol nederlands propranolol cefalea ticlopidine discontinued effetti di viagra crestor e gravidanza dulcolax zäpfchen pille provera domena verat net farmaco micardis 80 mg allegra estetica ascoli piceno bactrim sciroppo x bambini coumadin e warfarin sono la stessa cosa allegra donatella anorexia effetti positivi del viagra aricept demenza vascolare effetto viagra 50 mg generico do viagra nomes risperdal piqure augmentin antibiotico prezzo ventolin costo senza ricetta cialis controindicazioni varicocele acquisto cialis originale 5 mg risperdal vs fanapt domperidone generique motilium prezzo aciclovir 800 diflucan 150 posologia dosaggio lasix nel gatto ricetta bianca ripetibile viagra qual è il prezzo del viagra antabuse serve ricetta voltaren dispers 46.5mg diovan taper orlistat medicamento generico diphenhydramine escitalopram lariam come si prende effetti collaterali voltaren punture cipro del nord hotel antibiotics depo provera birth control clomid e cicogna istituto comprensivo allegra di valverde risperdal bucodispersable voltaren mandeloperation agen viagra di bali lariam statistics cipro termini metro diflucan a stomaco pieno risperdal 0.5 mg tabletten tegretol sciatica meglio il viagra o cialis medicine che interferiscono con il coumadin augmentin bambini scheda tecnica cardizem farmacocinetica cena leka crestor quanto cialis posso prendere volo più hotel cipro viagra und nitro noroxin foglietto illustrativo voltaren punture serve la ricetta clomid clomifene e ovulazione viagra e cibo allegra 180 mg genérico viagra istruzioni uso cialis confezione da 10 mg citodon eller voltaren depressione e zoloft arret risperdal 1 mg combinatie ritalin en risperdal minocin è fotosensibilizzante meglio repaglinide o metformina dieta per chi prende il coumadin dosaggio zantac gatto effetti indesiderati con clomid quante punture di voltaren costa nord cipro voltaren čepići 50 efficacia di propecia tegretol psicofarmaco il principio attivo del viagra voltaren ofta torrinomedica allegra agencia turismo quanto costa zovirax crema zoloft e assuefazione apple cider vinegar differin il cialis aumenta il testosterone celebrex per mal di schiena levitra non fa effetto dulcolax diet cipro città fantasma voltaren rapid and codeine nexium compresse effetti collaterali farmacie italiane che vendono cialis atomoxetine strattera bula cos'è il cialis generico lipitor precio chile voltaren per il mal di testa casodex 150 effetti collaterali cialis e problemi circolatori cialis generico buono clomid gravidanze finasteride a giorni alterni cipro pericarditis posologia voltaren intramuscolo il diflucan 100 è un antibiotico prometrium è mutuabile per il cialis ci vuole ricetta bufala allegra via orazio sono un allegra coccinella testo dosaggio coumadin secondo inr cialis quanto dura l'erezione voltaren gel mutuabile precio voltaren supositorios nitrofurantoin bei penicillinallergie zovirax compresse è mutuabile levitra 10 mg precio chile aerosol cu ventolin consolato di cipro italia prostatite cronica bactrim monolocale roma cipro ni una dieta mas orlistat benzac ricetta medica augmentin interferisce con yaz cialis a minor prezzo trazodone and quetiapine campi golf cipro cipro cartina turistica remedio allegra d serve lyrica cymbalta neurontin vodafone via cipro principio attivo di xenical cialis generico torino componentes del medicamento voltaren voltaren picaturi oftalmice voltaren dispers novartis pharma beipackzettel voltaren and prednisone metoprolol er lawsuit lioresal 25 mg pret compensat clomid e giramenti di testa posso prendere augmentin dopo i pasti zyprexa come sospendere orlistat farmacopeia viagra angine poitrine medicamento motrin 600 mg generico de allegra pediatrico federica provera il viagra alza o abbassa la pressione prometrium e seno gonfio clomid x rimanere incinta rcm risperdal consta ficha farmacologica del tegretol remeron e ritenzione idrica viagra dubai verboten gelato gusto viagra depo provera adrenal glands viagra powell von mp3 cosa fare se il cialis non funziona incendio sulla nave da crociera costa allegra suprax foglietto illustrativo tegretol ne icin fungsi provera medroxyprogesterone giacino amantadine ventolin è un farmaco salvavita zoloft minzione a cosa serve il farmaco abilify propecia avion musica allegra video matrimonio cymbalta provigil combination posologia bactrim sciroppo trandate infusione continua quanto costa cialis 5 mg in farmacia voltaren et nurofen lamictal dosaggio ematico ventolin puff torrinomedica cipro delusione tinea versicolor nizoral tablets il viagra fa male per la pressione alta zantac fiale scheda tecnica levitra presion alta propranolol 80 mg er capsules compresse a base di orlistat aciclovir come profilassi bactrim stomaco vuoto o pieno allegra compagnia lucana assumere cialis can i buy viagra in puerto rico augmentin posso andare al mare atarax sospensione anafranil sovradosaggio cucine lube allegra qual o generico do voltaren cipro vs levaquin for diverticulitis come si usa voltaren a cosa serve il voltaren fiale voltaren y neurobion cipro familia diaz voltaren co to za lek muscoril o voltaren cipro a gennaio genegra viagra strips colchicine opocalcium 1mg tinidazole indonesia dipyridamole diabetes fumetteria cipro risperdal epilepsie cefixime bambini isola di cipro divertimento temperature a cipro ad ottobre antialergico allegra d engorda voltaren inj im seroquel and pericarditis motilium lingual posologia perche zyprexa fa ingrassare differin 0 1 ultrafarma quanto costano le cialis triamcinolone 0.1 cream 454gm tradizioni natalizie a cipro la differenza tra cialis e viagra risperdal impotenz cialis originale san marino cosa contiene clomid meclizine hcl/antiemetic motilium farmaco generico voltaren poland alimenti da evitare quando si assume il coumadin digoxin si calciu voltaren e antibiotico voltaren con vitaminas primperan zantac toprol succinate er mal di schiena brufen o voltaren neurontin for pudendal neuralgia rifampin ofloxacin minocycline granuloma annulare lioresal intratecal argentina pillola come il viagra differin carcinogenic parcheggio cipro roma vaticano ciprofloxacin for uti duration anti inflammatory voltaren side effects rucola viagra terramycin n gentamicinsulfat voltaren dolo liquid packungsbeilage albenza almenno il methotrexate fa cadere i capelli diovan pt assistance program levitra senza effetti collaterali augmentin 1 gr in gravidanza bactrim sciroppo indicazioni guida turistica di cipro clomid e prurito intimo ogni quanto prendere il cialis cost of risperdal consta uk voltaren 50 cena un lasix al giorno cefixime ornidazole combination cardura disfunzione erettile voltaren or traumeel abilify e depressione bipolare strattera vs concerta adults vermox costo in farmacia citalopram escitalopram difference viagra pocelui zippy is metoclopramide a proton pump inhibitor lanoxin in fibrillazione atriale medicament prednisolone sandoz 20mg olanzapine arrow generiques cat costa un sampon nizoral