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
tinidazole la gi farmaco inderal 40 cipro seborrheic dermatitis buy voltaren australia arimidex e depressione quando arriva viagra generico differenza tra alli e orlistat viagra prima dei pasti suprax effetti collaterali nitrofurantoin di indonesia voltaren compresse quante volte al giorno benzac gel perossido di benzoile 5 cioccolateria cipro wellbutrin e sonnolenza augmentin bambino quanti giorni augmentin duo forte diverticulitis po to iv diltiazem conversion viagra abbau zoloft fa male al cuore zofran a cosa serve minocin posologia acne terapia aciclovir varicella cose da visitare a cipro escitalopram citalopram unterschied noleggiare auto cipro senza carta di credito zoloft per ansia generalizzata pressione alta e cialis comprar viagra farmacia chile norvasc impotenz depo provera dizzy voltaren na ganglion finasteride dopo un mese metoprolol succinat-ct 47 5 mg beipackzettel augmentin per raffreddore gatti il motilium candida diflucan funziona allegra e celestamine cat costa pastilele viagra rosuvastatin fda guidance levitra orosolubile da 10mg frolla allegra mulino bianco vico von allegra domperidone in palliative care principio attivo del lasix bactrim va bene per mal di denti propecia immagini aspirina e plavix insieme meglio viagra o altro risperdal consta 100mg chi puo usare il cialis chi soffre di ipertensione può prendere il viagra finasteride e prolattina snorta viagra risperdal consta generic form metoprolol tartrato presentacion risperdal consta patient assistance program cipro pesca subacquea voltaren dis agrisi finasteride dolore testicoli levitra giudizi augmentin e amoxicillina sono la stessa cosa componentes voltaren gel differenza tra zitromax e augmentin voltaren rapid haitat seroquel prolong beipackzettel lasix compresse indicazioni colchicine maladie periodique nome do generico de viagra prof allegra san giovanni chi prende coumadin cosa non deve mangiare zoloft durante l'allattamento allegra posologia infantil differin gel embarazo cipro vacanze estate 2013 perioral dermatitis minocycline baclofen pagine sanitarie assenza di ovulazione con clomid propranolol bol glowy salbutamol ventolin dosages inderal pharmazie differenza tra lyrica e cymbalta cipro traghetti dall'italia valor do allegra pediatrico principio attivo di seroquel triamcinolone acetonide cream on neck pharmacie qui vend viagra xenical acquisto metoclopramide sciroppo risperdal gotas 60 ml previsioni meteo a nicosia cipro principio attivo aldactone augmentin 12h suspension pediatrica kombinera citodon voltaren acquistare aldara online cialis generico è sicuro tinea versicolor lamisil gel da vedere a cipro minoxidil e propecia risultati bactrim forte confezione alternativa natural al ventolin triamcinolone acetonide chemical name effetti collaterali con coumadin revatio vs viagra cost acquisto viagra generico in contrassegno tagliare pastiglia viagra risperdal 3mg filmtabletten sostanze naturali effetto viagra cialis giallo allegra amazon com ciprofloxacin for uti e.coli augmentin compresse quando si prende conversion risperdal consta oral claritin d allegra d or zyrtec d affitti roma prati cipro lyrica vs neurontin cost biografia pasquale cipro neto spc ventolin evohaler carta di credito anonima cipro arzneimittel cialis calcolo augmentin bambini presa elettrica cipro clindamycin iv po conversion autobus termini cipro cipro neuralgia obagi tretinoin cream .1 percent cuanto vale orlistat colombia durata effetti collaterali lariam costo del viagra en colombia metropolitana via cipro posso provare il viagra risperdal dopo quanto tempo fa effetto diclofenac (voltaren cataflam voltaren-xr) clozaril monitoring canada viagra spedito da europa propecia vendita fattura acquisto cipro piero provera allegra pediatrico 60ml preço hotel castelli nicosia cipro meclizine diabetes triamcinolone face rash il diflucan è mutuabile passaggio da cipro sud cipro nord diovan 80 mg cena no period after provera menopause definicion del medicamento propranolol a che eta si prende il viagra seroquel abbauzeit alesse sugar pills no period activo del voltaren dove comprare kamagra sicuro escitalopram ireland diflucan insufficienza epatica nizoral sampon indicatii prezzo cialis 5 milligrammi allegra lucarelli milano co rosuvastatin calcium amaryl fda approval date inderal attacchi panico risperdal per bambini motilium medicament interdit zyprexa in quanto tempo agisce normandia petrosani calan cipro monti troodos atrovent ventilan soro augmentin ritarda il ciclo augmentin sospensione orale bambini dose cialis generico italiano a quoi sert le clomid 50mg finasteride risultati frontale cialis effetti collaterali controindicazioni el medicamento viagra abolizione piano terapeutico clopidogrel depo provera sore arm vacanze estate 2013 cipro farmaco equivalente al cialis risperdal et la libido imiquimod (aldara) chile vytorin scheda tecnica augmentin ed esposizione al sole farmaco che sostituisce il viagra risperdal pour alzheimer celebrex foglio illustrativo voltaren opis diovan 160 mg generic viagra biologico foto di cipro grecia atarax 100 mg effet secondaire escitalopram lamotrigine seroquel prolong beipackzettel 50mg olanzapine chlorpromazine voltaren dopo i pasti dapsone colchicine voltaren ernia disco augmentin per lo streptococco tumore al seno femara viagra e cardiopatici viagra generico online italia differenza tra augmentin e klacid fungsi metoclopramide hcl 10mg voli per nicosia cipro cilostazol+clopidogrel+aspirina cipro gi problems risperdal accion terapeutica quanto costa augmentin bustine costo ufficiale cialis che cos'è il voltaren viagra schedule dea stopping voltaren hotel allegra pontresina svizzera escitalopram 100mg atralin vs generic tretinoin naltrexone struttura voltaren resinat sport controindicazioni uso viagra cipro infeccao intestinal generic protonix cost propranolol local anaesthetic risperdal consta nhs augmentin sospensione generico diclo ratiopharm voltaren laboratorio do medicamento avodart il viagra nello sport abuso di viagra allegra bonfiglio allegra ziletti strattera producent la grotta del remeron prometrium a bioidentical ibuprofen 600 voltaren proventil aerosol inhaler commenti su cialis 20 mg atrovent ventolin difference triamcinolone acetonide cream versus ointment clomid dolori ovaie post ovulazione orario posta via cipro brescia pletal foglietto illustrativo tace il labbro vedova allegra metoprolol er scored generico do combivent farmacia italiana online cialis voltaren pinzamiento augmentin bambini bustine dosaggio accutane generico precio costo cialis da 20mg seroquel che serve voltaren emulgel serve ricetta cipro collyre triamcinolone paste cost principio ativo do diovan triplo cipro dose uncomplicated uti trazodone e gravidanza risperdal per quanto tempo ventolin si sarcina viagra assunto da giovani farmaco dostinex fa ingrassare viagra herbal prima setia prednisone per os risperdal consta refrigeration sigla partita iva cipro accutane cheilitis cipro giugno clima clomid senza prescrizione vermox bambini effetti collaterali voltaren 75 nedir quando prendere augmentin prima o dopo i pasti cialis effetti collaterali mal di schiena pletal farmaco scheda tecnica remeron ingrassare metoclopramide discontinuation zovirax e insufficienza renale trattoria allegra sorrento prezzo levitra da 5 mg a che cosa serve clomid assuefazione da zoloft difference entre motilium primperan voltaren per la sciatica trazodone iponatriemia acquistare cialis generico italia chi ha provato orlistat spine corrente cipro voltaren scottature deralin 40 propranolol farmacia online viagra italia medicamento propranolol farmacocinetica allegra trio arpeggione si puo dare augmentin al gatto lasix ci vuole la ricetta dove comprare cialis generico cerco voltaren ibuprofen salbe il clomid quando fa effetto novartis pharma gmbh voltaren dispers voltaren spray precio zyprexa sospensione sintomi di astinenza da anafranil monitoraggio del coumadin vermox come prevenzione allegra biggs lubrano voltaren fiale prescrizione dosaggio coumadin e inr vendita del cialis cipro crisi economica viagra oro 50 mg prezzo orlistat 120 posologia autonoleggio a cipro imodium propranolol cuanto vale un viagra chile cipro vacanza per giovani farmaco lincocin a cosa serve voltaren emulgel diclofenaco sodico clomid dolori ovulazione fabrizio provera giornalista significato di vedova allegra ciwa protocol clonidine recensioni acapulco beach club cipro farmacia acquisto cialis clomid regolarizza il ciclo ricarica pompa al baclofen que contiene risperdal la vedova allegra milano 2013 metformin si ovare polichistice antibiotico augmentin bambini dosaggio dexamethasone triamcinolone conversion accion farmacologica de bactrim cialis 5 mg generico seroquel 200 mg rp cipro cosa è successo allegra d pediatrico bula is tinidazole carcinogenic dove viene prodotto il vino di cipro per comprare il levitra in farmacia ci vuole la ricetta camping cipro nord propranolol hyperventilatie celebrex farmaco effetti indesiderati zoloft per ipocondria diflucan modo di somministrazione statine e cialis allergy medicine allegra d aciclovir e ipertensione acquisto cialis con pagamento in contrassegno voltaren salbe analthrombose collegamenti creta cipro clomid da quale giorno fuso orario milano cipro aciclovir 5 crema prezzo biaxin clostridium difficile u-triamcinolone-g ristorante allegra fattoria malchina medicamento genérico motilium come si chiama l equivalente del viagra preco do viagra generico na ultrafarma quanto custa remedio allegra finasteride inibitore nome generico do cialis voltaren pomata foglio illustrativo chitarrista dei tokio hotel va in overdose da viagra augmentin bustine quante volte al giorno quando clomid non funziona vendita di viagra in italia ciprofloxacin fluocinolone acetonide and clotrimazole cream cialis e donazione sangue voltaren tabletten doping chi a provato il cialis medicamento motrin 400 aldactone 100 fa dimagrire provera 10 days no period depo provera no period pregnancy precio viagra generico farmacia differin 0 3 gel com 30 gramas perseo via cipro 56 cialis generico preço farmacia cialis funziona poco viagra uzycie cymbalta ed erezione xenical serve ricetta medica effetti del cialis scaduto buffetti roma cipro glucovance peru depo provera positive pregnancy test vermox foglio illustrativo levitra si puo comprare in farmacia senza ricetta crociera msc allegra pristiq com bupropion il voltaren è mutuabile plavix farmacocinetica cialis e prostatite clomid funziona con fsh alto viagra senza ricetta medica foglietto illustrativo levitra 20 mg propranolol e cefaleia spiagge naturiste cipro period late depo provera pellegrinaggio cipro posologie cialis 2 5mg tachicardia con zoloft medicinale equivalente al viagra visitare cipro nord augmentin per cistite gatto il miglior sito per comprare cialis cialis generico dall'inghilterra yasmin e antibiotico augmentin medicine rosuvastatin calcium acquisto cialis e viagra com'è cipro a settembre feldene farmacocinetica il viagra fa male alla prostata uguale al viagra viagra a chi non serve herpes genitale aciclovir posologia motilium per meteorismo terazosin saw palmetto generic depo provera birth control efficacite cialis 20 mg voli milano cipro paphos prezzi immobili a cipro bactrim sciroppo per mal di gola lamictal non funziona camper ci cipro 1 prometrium e ritardo del ciclo medicament tegretol 200 rocaltrol vitamin d equivalent vacanze cipro 2012 a cipro si parla inglese ranolazine and viagra prometrium 100 mg prezzo contraindicatii arcoxia 90 mg sito sicuro per acquistare cialis generico re di sardegna di cipro e di gerusalemme dulcolax capsule molle voltaren daily dose sandoz rosuvastatin calcium can accutane cause perioral dermatitis ciprofloxacin fluoroquinolone antibiotic visitare larnaca cipro zoloft e ossessioni laboratorio fabrica voltaren vardenafil levitra generico farmaco motilium 10mg disturbo bipolare lamictal come funziona levitra voltaren t fass avodart impotenza voltaren forte pastillas voltaren fuori commercio ventolin farmaco da banco minoxidil e finasteride alopecia androgenetica maschile viagra satan eczane festività di cipro escitalopram identifier aciclovir uso preventivo ragazza prende viagra allegra pediatrico da sono conjunto cozi pasta allegra inox - tramontina cyclobenzaprine trazodone quanto costa un viaggio a cipro voltaren salbe preise sintomi del coumadin tri glide vs tricor voltaren dispers nedir diflucan compresse controindicazioni ampicillin principen diovan generic price farmacocinetica lincocin augmentin infezioni gengive voltaren pastile 100mg augmentin uti e coli le medicament zocor il voltaren fa male a quoi sert le medicament aciclovir procardia nifedipine pregnancy cipro 500 preço generico prednisone dose for pericarditis augmentin x ascesso dentale come fare impacchi di voltaren cymbalta e antibiotici cialis 5 mg dopo quanto tempo fa effetto dimenticato propecia commenti su orlistat cialis e viagra a confronto risperdal erowid vault augmentin infezioni ginecologiche aciclovir blocca varicella nizoral hydrocortisone cream viagra opinie bactrim forte per quanti giorni medicamento propranolol de 10mg camere in affitto roma cipro cialis vanzare escitalopram difference citalopram fincantieri genova via cipro 11 voltaren y tension arterial commandaria vino cipro diflucan 150 gravidanza ingrediente activo del voltaren rheuma voltaren hydrochlorothiazide induced acute non cardiogenic pulmonary edema triamcinolone ulcerative colitis rifampicin isoniazid ethambutol combination nizoral shampoo perioral dermatitis turisti per caso cipro bella vacanza cipro