@Baytowvin said a week, but I’ve had no trouble with it lasting 2 weeks or more. Some people would want to pasteurize the eggs before keeping it that long. He is right on one thing - only my big batches ever last that long! If you make a cup at a time, you won’t have to worry about it. The link he gave is the recipe I use - it uses a whole egg instead of just the yolk. I use avocado oil for most of mine, but I promised myself that my next batch is going to be “baconnaise.” I have a stash of bacon grease that I need to use. 
There is a mayonnaise thread in here that talks about making mayo with a stick blender, and that’s the way I’m doing it these days. I didn’t realize the key was in the right size container (my stick was too small to use a mason jar). Once I got that right, it’s under 5 minutes from gathering ingredients to scooping the mayo into your storage container (if you can’t store it in the container you made it in). And SO much cheaper than mayo that has all the “junk” ingredients …