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
aricept allergy nursing interventions for clindamycin diabetic retinopathy and coumadin anastrozole hair loss clarinex coupons proactive and differin augmentin and clindamycin together lamictal and folate deficiency tretinoin syndrome is it safe to use triamcinolone during pregnancy methotrexate weight loss or gain does finasteride raise blood sugar dose of topamax for depression how much acidophilus should i take with clindamycin can you try to get pregnant while taking provera can depo provera cause polycystic ovaries metoprolol low dose side effects to prometrium 200 mg atenolol erectile dysfunction zoloft extreme weight loss lamictal medication coupon diltiazem er and metoprolol valtrex aspirin interaction finasteride does not work for me can naltrexone cause weight loss revia quit smoking cialis vs diltiazem does topamax cause neuropathy differin gel in the morning youtube musicas gospel deus provera fungsi salep elocon topamax cost in canada finasteride alopecia areata depo provera and keppra metoprolol tartrate panic attacks imuran and chicken pox lyflex baclofen requip sr does lamictal affect gaba trental zāles rosehip tretinoin low dose naltrexone metabolism how much tegretol to overdose can you take dramamine with lisinopril rx metoprolol generic finasteride at walmart does tretinoin 025 work can u mix aspirin and percocet diltiazem makes me sleepy triamcinolone acetonide cream can you use your face strep pharyngitis clindamycin lamictal cause miscarriage infusion mit trental does olanzapine work instantly how long does one depo-provera shot last wikipedia aricept can provera cause nausea can baby take zantac and gripe water rejuva-a tretinoin cream mircette loestrin maca and lamictal clindamycin dose for uri concerta side effects weight loss clindamycin thyroid tretinoin with clindamycin gel how many mg of dramamine to get high dilantin therapeutic effect clarinex samples physicians lamictal and creatine info on the depo provera shot tegretol and advil zantac suspension for dogs when did actonel come on the market replacing finasteride with saw palmetto actonel blood tests when you stop depo provera neurontin use while pregnant naltrexone vs topamax restoril and lamictal dutasteride hair loss reviews baclofen take effect can i take aleve and indomethacin together going off depo provera pregnancy dilantin and muscle relaxants provera vet toprol xl not working how many mg of baclofen gets you high isotretinoin mood changes on depo provera can i get pregnant possible side effects of meclizine naltrexone is what type of drug depo provera and dental problems diltiazem tablets 60 mg when is aricept no longer effective finasteride and doxazosin combination tretinoin cream hyperpigmentation can you take advil cold and sinus with zantac benefits of tretinoin on skin generic toprol reviews zonegran vs topamax forum tretinoin and sensitive skin can a man take clindamycin using isotretinoin gel clindamycin night sweats jaw pain actonel side effects clindamycin vs flagyl coverage artane y alcohol how many zantac can i take in 24 hours how long does it take provera to get out of your system differin gel sale 5 day course of provera how many days can i take imitrex detox body from depo provera can hydrochlorothiazide cause hair loss how long does it take for dulcolax to wear off tramadol dog pain relief depo provera thyroid dutasteride scalp injection blood pressure med diltiazem clindamycin pledgets prescription can toprol xl be cut in half differin free coupon clindamycin max daily dose trental and plavix together what happens if you stop taking neurontin tretinoin cream for fungus how much is benzac ac in the philippines depo provera shot bloating is requip a controlled substance olanzapine 15 mg side effects provera not starting period how long does it take for arava to work lamictal rash deaths can you get pregnant while using depo provera shot topamax reviews bipolar provigil addiction treatment asacol and water retention stieva-a tretinoin cream 1 can i combine tylenol and aspirin keflex plus clindamycin can you crush imuran topamax trileptal does robaxin cause hair loss aldara cream success rate ambien sleep aid dosage differin how long to use it interaction fosamax et calcium isotretinoin lcms baby aspirin and motrin can you take unisom and ambien together buy provigil modafinil photo meclizine tablet zyloprim aa pharma actonel metabolism lariam night terrors what is a normal dose of neurontin is modalert as good as provigil neurontin patient assistance program application the effects of baclofen diamox idrope cocleare does dramamine work for hot flashes biaxin hair loss what is  clindamycin hcl 300 mg prescribed for norvasc and calcium deficiency does provigil cause weight gain can you take imitrex and ativan together trileptal side effects sun what if baby spits out zantac carafate other uses metoprolol tartrate 25 mg what is it used for retin a tretinoin reviews baclofen belgique aspirin and prednisone side effects what does baclofen pump do neurontin for migraine prevention side effects dilantin levels too high side effects differin gel fda prednisone and high calcium levels tegretol side effects uk concerta vs vyvanse weight loss clindamycin hcl bad taste mouth meclizine patch otc lamictal increasing dose bone pain with actonel epivir hbv dosage dulcolax laxative instructions olanzapine no emotions benzaclin vs clindamycin phosphate imitrex philippines lamictal sore eyes does zanaflex cause erectile dysfunction triamcinolone 0.1 topical cream triamcinolone acetonide side effects injection cerebyx and dilantin clindamycin alcohol interaction finasteride hair count topamax overdose death low dose naltrexone serotonin what does asacol do for colitis tricor weight loss side effects how much sodium is in fosamax mirapex and celexa interactions can you take aleve and ativan saw palmetto avodart together what happens if you swallow a dulcolax suppository seroquel lamictal combination can you take clindamycin and macrobid together ibuprofen and imuran clindamycin use with alcohol trileptal ocp how long for depo provera to wear off can i take ativan and aspirin together aricept and benadryl interaction urinary tract infection and clindamycin seizure medications dilantin atorvastatin calcium therapeutic class generic name for rocaltrol how much finasteride should i take application of diltiazem ointment pletal atc can i take aspirin and tramadol lamictal rapid weight gain how long until tretinoin starts working weight loss stories with topamax ponstel and tylenol effexor xr weight loss side effects liquid carafate ingredients prometrium timing clindamycin phosphate topical how to use triamcinolone acetonide 0.1 cream side effects hydrea forums use for clindamycin phosphate gel metoprolol bad for kidneys weaning off aricept artane bathroom installations lamictal and chronic cough lamictal colors keppra lexapro interactions tretinoin cream 0.05 benzoyl peroxide should prometrium be taken with food hip pain after taking fosamax neurontin lyrica and cymbalta does tretinoin work for sun damage tretinoin cream 0.05 cream does imuran cause rash triamcinolone cream 1 pound jar topamax trileptal interaction lamictal and weight gain over the counter clindamycin and benzoyl peroxide topical can i take zantac and rolaids together tretinoin for acne spots aleve naproxen allergy does ponstel need a prescription tell me about the medicine neurontin rosuvastatin calcium api storage conditions weight loss olanzapine how do i come off olanzapine does clindamycin cause urinary tract infections actonel dr monograph will aricept get you high can prometrium help hair loss topamax concentration problems neurontin pharm class 1.25 mg olanzapine isotretinoin treatment for rosacea clindamycin dosing in renal failure can you take penicillin and clindamycin together artane business directory clindamycin topical diarrhea clindamycin for breast abscess topamax and skelaxin depo provera 2 shots when does neurontin peak brand names and generic names for isotretinoin does ponstel make you high provigil online canadian pharmacy actonel medscape trileptal package insert novartis triamcinolone lumbar injection how long does depo provera take to leave your body clindamycin resistance group b streptococcus does ginseng affect warfarin drug study of ranitidine zantac zantac and miralax price of generic imitrex how long does aldara take to clear warts weaning schedule for neurontin how long does depo provera depression last does abilify prevent weight loss arcoxia umstritten using elocon when pregnant what does the pill finasteride look like metoprolol er what is it used for provera 10mg uk valproic acid dilantin interaction trental cr 600 nedir diltiazem lactation how many days after taking provera will i ovulate can motrin cause hair loss tretinoin and coconut oil imitrex and vision can you take zantac and flexeril together isotretinoin acanthosis nigricans clindamycin hcl sinusitis lamictal package insert levalbuterol and atrovent asacol hd not digesting trental 400 mg tb generic provigil release date does naltrexone block benzos aricept issues naltrexone hcl 50mg tab rosuvastatin calcium salt molecular weight oral clindamycin for pid xeloda withdrawal actonel patient savings card estrace and prometrium therapy can you take metoprolol if you have low blood pressure baclofen joint pain clindamycin plus alkohol epilepsy tegretol pregnancy what does the aricept pill look like diltiazem active metabolites dutasteride how does it work xalatan and palpitations how much is zantac 75 can toprol kill you how effective is depo provera against pregnancy tretinoin week 4 is zyprexa and olanzapine the same metoprolol and seasonal allergies claritin and aspirin interaction can triamcinolone be used for athlete foot atenolol conversion to metoprolol dose prometrium uterine cramping can i drink beer while taking neurontin zantac and benzos aldara 5 cream coupons can i drink on clindamycin hcl advil pm and lamictal generic for finasteride 5 mg does zantac relief heartburn topamax category for pregnancy rocaltrol for osteoporosis weight loss after stopping propecia naltrexone drinking alcohol which is better aspirin or warfarin does metoprolol cause heartburn isotretinoin brand names in pakistan topical isotretinoin vs tretinoin dilantin like morphine ok to mix aspirin and tylenol recommended dosage of clindamycin tegretol with lamictal aspirin vs coumadin for stroke morphine naltrexone combination withdrawn what is a baclofen pump for neurontin interaction with flexeril does finasteride decrease testosterone differin chemical peel pulmicort and atrovent together mestinon rxlist trileptal missed period tegretol cp 200 mg trileptal itching generic topamax weight loss naltrexone side effects reviews clindamycin uses for bv zantac 75 ml didn't start period after provera mometasone furoate topical solution for hair loss can you have dulcolax while pregnant nino revia imuran and gas imuran 50 mg 25 tabletas plavix and aspirin post cabg differin mot store porer is topamax an addictive drug differin pads meclizine hydrochloride brand names lamictal dull does vasotec cause hair loss adipex weight loss blog zantac thyroxine how much weight does depo provera make you gain neurontin drug screen prograf price uk metoprolol-hctz 50-25mg tab naltrexone and brain cancer antybiotyk clindamycin cena tretinoin o.1 cream does zantac contain magnesium trisilicate differin cream dry skin lamictal disintegrating tablets lamictal sleeplessness metoprolol succinate availability muscle aches isotretinoin topamax blindness how does topamax and weight loss anacin advert differin insurance coverage reaction allergique aldara clindamycin 2 cream side effects is it safe to stop taking topamax aldara and fatigue dulcolax how supplied singulair and tegretol price of benzac ac 5 aricept usa imitrex paxil interaction dramamine fatigue casodex monotherapy prostate cancer isotretinoin used for neurontin interactions with antacids tretinoin cream reactions mixing aleve and mobic metoprolol tartrate and grapefruit arcoxia lumbago clindamycin pads face metoprolol iv continuous infusion does clindamycin work for acne yahoo pain relief whilst on warfarin mixing atrovent with albuterol is tretinoin cream available over the counter nausea medication dramamine does claritin contain aspirin can nitrofurantoin cause hair loss what does cd mean in diltiazem blutspende isotretinoin how to take baby off zantac topamax in system clindamycin high doses differin gel รีวิว can you take provera with clomid problems with generic toprol xl provigil sales 2011 clindamycin and ortho tri-cyclen dilantin and coarsening of facial features aldara causes red bumps tegretol and prednisone metformin tablet for weight loss tretinoin cream 0.1 hyperpigmentation toxic dose of neurontin neurontin dose for restless leg syndrome loestrin vs mircette what is avodart used to treat how long to take albenza babyface tretinoin and hydroquinone cytoxan and joint pain prometrium with estradiol metoprolol generic drug toxic levels of trileptal canine prednisone hair loss can clonidine cause erectile dysfunction metoprolol drinking alcohol sapho isotretinoin 23 brookwood crescent artane nimotop tablets can i use elocon lotion on my face minocycline and hair loss how long can i take imitrex acetylcholinesterase mestinon what time of day is best to take detrol differin cream in india converting metoprolol to bisoprolol when will asacol hd go generic tretinoin treat acne scars toprol xl recall 2009 actonel arthritis bisacodyl dulcolax mechanism of action switching from minoxidil to finasteride neurontin for seizures in dogs what is better retin a or differin provera 30mg voveran price india diltiazem compound cream what is the difference between oxybutynin and detrol human clindamycin dose atacand and aleve when is the best time of day to take prometrium differin gel sestavine getting pregnant after stopping depo provera pamelor for sleep aid interaction synthroid calcium swords garden chinese artane number metoprolol and statins house for sale st davids wood artane does zantac cause bone fractures xeloda maintenance imitrex and codeine baclofen hiccoughs trazodone baclofen interaction neurontin and bad taste in the mouth what is metoprolol tartrate medication used for how to use clindamycin and nicotinamide gel express scripts prior authorization form for provigil tretinoin wrinkles before and after what is ic metoprolol tartrate used for aspirin with methotrexate