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
prednisone cat hair loss zoloft pms symptoms valtrex and herpes labialis which is most effective cialis or viagra does prednisone help with bladder infections why does cialis use two bathtubs ciprofloxacin and corticosteroids flagyl safe breastfeeding should i take a whole viagra how to get viagra prescription online dermatitis herpetiformis and prednisone prednisone boop lasix testosterone clomid and ruptured cysts doxycycline not working gonorrhea is cialis a scheduled drug foro cialis 20 mg can ampicillin treat bronchitis best place to buy clomid in uk clomid and test booster for pct grapefruit and synthroid what is the recommended dose of propecia clomid heavier period ventolin inhaler makes me cough is it safe to switch from zoloft to celexa chapped lips accutane how to get viagra in sydney clomid cycle start doxycycline is it a sulfa drug prednisone effects estrogen zoloft reuptake flixotide or ventolin first thuoc xit hen ventolin hydrochlorothiazide morning or evening online viagra ratings metformin dissolution profile does metformin cause weight loss during pregnancy cipro and getting pregnant where to buy brand viagra buspar and irritability viagra safety profile generic propecia uk can you take vitamin b complex with prednisone cephalexin 500mg for eye infection falcon pharmaceuticals eye drops prednisolone can cialis be found in a drug test clomid 100 mg progesterone diflucan price cvs lasix osmotic diuretic conversion iv methylprednisolone to po prednisone heart pain accutane tretinoin cream while on accutane doxycycline amitriptyline interaction unprescribed clomid twins success metformin side weight loss accutane 20mg diary is cytotec available in the philippines what is dosage for viagra cipro for parasite infection can you take zoloft and fioricet together prednisone dosage for nasal polyps accidentally took 2 prednisone does cipro treat staph kamagra pill side effects zoloft price philippines doxycycline benefits acne hashimoto's disease synthroid dosage doxycycline for pyometra metformin dosage uk ventolin pharmacy uk valtrex and fetus walmart levitra price lisinopril permeability can i take 1000 mg of flagyl will lisinopril make you urinate more how long does weight gain from prednisone last does metformin and clomid work flagyl tingling prednisone dangers side effects zoloft side effects on newborns xm radio viagra commercial ciprofloxacin parasites when viagra doesnt work treating erectile dysfunction thyroidectomy synthroid weight loss side effects of clomid and trigger shot anxiety on prednisone lexapro vs paxil for depression other names for zithromax can i have alcohol with clomid metformin and overdose where can you buy flagyl over the counter viagra and potassium drowsiness and zoloft what medicine can i take with prednisone starting zoloft no appetite is zithromax and amoxicillin the same clomid pregnancy test coreg lisinopril interaction cephalexin to treat cystitis zoloft causing night sweats ciprofloxacin nicotine toddler throws up prednisone is shaking a side effect of prednisone in dogs doxycycline dosage toothache cytotec etter abort does clomid help with diminished ovarian reserve amoxil inactive ingredients the use of accutane clomid 20 mm follicle codeine en doxycycline stop clomid get pregnant how long is propecia shed diflucan low blood pressure diflucan dosage 150 mg viagra strawberry metformin and keflex interaction can you drink when you take ciprofloxacin cipro effects on liver mild acne accutane initial breakout lisinopril side effects anxiety ciprofloxacin effects on blood sugar clomid ovidrel cycle can i use ciprofloxacin for strep throat treatment with ciprofloxacin misoprostol cytotec harga just started lexapro headaches can i take multivitamins with prednisone how much money does clomid cost best day of cycle to take clomid what is the difference between zithromax and amoxicillin nolvadex for winstrol pct do strattera sexual side effects go away will acne get worse on accutane zithromax and flagyl interactions clomid for muscle building prescription accutane cost metformin clomid pregnancy rates propecia success pics cialis and high cholesterol prednisone to treat uti indian manufacturer of viagra does lasix interact with coumadin 30 mg buspar high how much does pfizer viagra cost viagra levitra cialis compare can clomid cause back acne phenergan cause drowsiness effects of alcohol mixed with zoloft hydrochlorothiazide off label top accutane lawyers nolvadex clomid pct dosage cytotec treatment valtrex use in autism does strattera build up in your system will viagra ever get cheaper can you mix cephalexin with amoxicillin doxycycline and coffee creamer magic mushrooms and lexapro clindoxyl gel accutane gay taking viagra pediatric phenergan suppository metformin lactose intolerance can estrace cause cysts mebendazole or albendazole over the counter how much prednisone for a sinus infection cd 17 no ovulation on clomid prednisone same as prednisolone recurrent yeast infection after diflucan does valtrex increased heart rate how often should you give ventolin does clomid increase risk of down syndrome can i take lasix everyday effect of viagra and alcohol how soon can you drink alcohol after flagyl effectiveness of lexapro for anxiety prednisone causes neuropathy grapefruit juice interaction with lisinopril taking cialis with flomax clomipramine and lexapro what causes vasculitis in sle why might prednisone improve the rash can taking synthroid make you gain weight estrace and infertility is diflucan the best treatment for a yeast infection does zoloft help with suicidal thoughts ampicillin dosage in dogs ohss on 100mg clomid lexapro cause migraines vermox romania can u lose weight by taking metformin herpes zoster valtrex dose clomid for post cycle metformin and clomid combined cytotec gastritis cronica zithromax and high blood pressure metformin stopped my period propecia success rates hair loss how long after taking prednisone do side effects last tetracycline antibiotics doxycycline metformin and ectopic pregnancy pregnant on clomid at 45 prednisone pack for asthma clomid and luteal phase diflucan bowel movement crushed flagyl in wounds 50 mg zoloft enough titrate off of zoloft 4th week of accutane will cipro treat herpes immediate effects of viagra metformin and ovulation predictor kits inn ciprofloxacin how to order levitra from canada chemical composition of lisinopril can i use prednisone and benadryl clomid doesn work what next where can i buy viagra on the gold coast does viagra work youtube metformin for ttc hydrochlorothiazide and decreased urination cialis mit levitra how to go back on lexapro methotrexate ciprofloxacin interaction provigil 200 mg street price provigil pill identification cephalexin broad spectrum antibiotics lexapro dose depression synthroid missed dose symptoms what is metronidazole flagyl forte metformin and smell urine phenergan vs zofran during pregnancy viagra 25 ml doxycycline cats upper respiratory treating postpartum depression with lexapro malaria doxycycline contraceptive pill can you buy ventolin inhalers over counter in uk taking metformin and lantus how to transition from zoloft to effexor cialis gout will zoloft make me fat weaning off prednisone depression why does zoloft make you yawn can you take robitussin while taking prednisone hydrochlorothiazide and lisinopril weight loss starting lexapro and dizziness doxycycline 100mg medomycin is zoloft safe for elderly can i take cipro with zithromax online levitra prescription aldactone with metformin lexapro and low blood pressure heavy bleeding with clomid dosage of iv flagyl flagyl rheumatoid arthritis accutane bad effects lisinopril diabetes dosage provigil alternative to adderall zithromax dose pediatric pneumonia clindamycin vs flagyl for bv metoprolol tartrate and prednisone when do i take my first clomid pill cialis peyronie�s treatment ovulation with clomid and hcg lisinopril and gastrointestinal side effects how long after i stop taking propecia will my hair fall out chances of having twins on 150mg clomid viagra wine cold medicine safe lexapro can i take metformin with omeprazole antabuse and vivitrol boots pharmacy viagra cost prednisone and brain tumor effects of too much synthroid motilium pharmacy does doxycycline help kennel cough valtrex brand new day commercial third dose of accutane can you take azithromycin and flagyl at the same time is viagra available over the counter in spain viagra 25 mg yorum viagra pens synthroid how long do i have to wait to eat after taking flagyl soon can drink viagra pacemaker where do you get cialis dangers of drinking with zoloft how does lisinopril hydrochlorothiazide work price of 100 milligram viagra mixing strattera with food zoloft side effects side effects how should a man take clomid dose for daily cialis can i buy viagra in pattaya doxycycline accutane together buzz off lexapro morning sickness medication phenergan what type of drug is zoloft classified as tapering prednisone lupus buspar to treat adhd retin a and accutane at the same time taking prednisone to prevent miscarriage side effects clomid and weight gain viagra for pulm hypertension prednisone accidental overdose is viagra an over the counter drug in canada ciprofloxacin 500 mg drowsy flagyl injection dose metformin hydrochloride tablets bp monograph levitra made in germany buspar and muscle tension my hair is thinning while accutane dog dosage prednisolone does viagra or cialis work faster typical course of cipro cheap viagra singapore prednisone dosage pediatric asthma prednisolone use in babies cipro and flagyl iv compatible lexapro dosage for panic attacks does sleepiness from lexapro go away strattera causing seizures vitex taken with clomid is it ok to take 2 diflucan is viagra from india safe lexapro to help anxiety retaining water prednisone zoloft cos'è metformin dose for obesity is lisinopril made of snake venom ciprofloxacin overdose amount clomid dose nhs doxycycline dry heaving scalp folliculitis accutane valtrex before laser treatment normal dosage for buspar metformin brain tumour zoloft and wellbutrin social anxiety lisinopril tablets 5 mg prednisone for rashes dosage doxycycline uti treatment what happens when you eat dairy with ciprofloxacin propecia prescribing doctors synthroid shakiness discount viagra canada pharmacy does zithromax cause gas pillole viagra online free metformin samples how many nolvadex should i take a day does clomid cause delayed menstruation cialis or viagra stronger what happens if i stop taking cipro cheap real viagra side effects of prometrium and estrace zoloft ppd insomnia what happens flagyl alcohol how long for cialis to become effective accutane itchy prednisone side effects for a dog ciprofloxacin otic perforation synthroid pregnancy risks lasix and seizures what is prednisone found in viagra and plavix cialis super force avis viagra vs cialis vs levitra prices zoloft vs paxil dosage lisinopril and arrhythmia metformin foggy head does 5mg of lexapro cause weight gain side effects of viagra doxycycline debut grossesse flagyl for small dogs cytotec arret travail lexapro withdrawal and dreams zoloft and numbness in fingers uti cipro not effective can you take motilium and imodium together can you take metformin and clomid together flagyl non alcoholic beers pfizer viagra production max strength viagra buy viagra in blackpool strattera making adhd worse what are the side effects of prednisone and alcohol types of diflucan gastric ulcer prednisone lexapro ciprofloxacin interaction can i take prednisone and ibuprofen doxycycline and singulair for ndph cephalexin monohydrate side effects accutane causing long term depression metformin hcl 500 mg and alcohol why you should stop taking zoloft zoloft ibuprofen drug interactions synthroid while trying conceive valtrex fainting prednisone for me cfs white tongue after cipro lexapro escitalopram package insert accutane self confidence 40 mg prednisone poison ivy can synthroid help acne is it legal to buy provigil online levitra performance anxiety zoloft causing hyponatremia prednisone injection for rheumatoid arthritis dapoxetine 60 mg india fruits that are natural viagra accutane i norge onglyza metformin combination pill lexapro and alcohol amnesia can i take prednisone with metformin diflucan wont work tamoxifen the same as nolvadex chemical content of viagra cipro et otite longer cycles after clomid amoxicillin cipro together clomid and unexplained infertility can accutane cure rosacea does cipro and flagyl make you tired kamagra tablets in india medical review propecia how to control your appetite while on prednisone buy generic lexapro online no prescription ciprofloxacin calibration curve cytotec induction dose chloramphenicol and ampicillin selection where to buy prescription cialis has anyone died from viagra can you take cipro with flagyl female viagra paypal what does accutane taste like can i take lexapro and omeprazole together what can you not do on accutane prednisolone dose sle zoloft 50 mg pill identifier lasix and cirrhosis metformin use in pancreatic cancer zoloft hair loss permanent how long does it take for your immune system to recover after prednisone questions to ask before taking accutane ciprofloxacin and paxil interaction the blood pressure medicine lisinopril clomid cycle for fertility cialis in durban effects of lisinopril on kidneys recommended dosage cytotec abortion accutane birth control methods has anyone taken zoloft what are my odds of having twins on clomid is combivent and ventolin the same can valtrex cause insomnia can you take keflex with synthroid does zoloft really work for anxiety cephalexin dosage tooth abscess best ways to take viagra does flagyl get rid of bv diflucan side effects taste can you take synthroid and phentermine cheapest price on viagra does zoloft help with nerve pain chest pain when swallowing doxycycline prednisone vs progesterone low dose cialis side effects zoloft ssri discontinuation syndrome doxycycline viagra interaction generic viagra reviews india will 3 days of prednisone cause weight gain side effects of drinking alcohol while on flagyl lexapro weight loss or weight gain ipledge account accutane how much prednisone to give to a dog will viagra help me stay hard after ejaculation cephalexin and ativan armour vs synthroid cost what does vermox cure ciprofloxacin did not cure uti action for lasix what milligrams does flagyl come in rapid heart rate prednisone clomid c1 kamagra oral jelly half ventolin inhaler pediatric dose clomid to treat secondary hypogonadism what are the side effect of prednisone for dogs benadryl interaction with lexapro how much b12 when taking metformin is erythromycin related to zithromax amoxicillin 500mg and prednisone has anyone ever taken viagra what to take with metformin for weight loss tapering long term prednisone anxiety on strattera vitamin b5 prednisone does metformin for pcos cause weight loss can you take motrin with buspar prednisone causing swollen ankles red wine vinegar and antabuse clindamycin flagyl interaction cephalexin at walgreens