Now, I remember most of my high school trig and know a few ways of marking off corners and measuring to get that perfect octagon from a square, but oh the cosines and tangents and finding a pencil and ruler is such a bore!
Here's the absolute easiest way to do it on a table saw with an angle adjustment, like the one at San Jose Techshop.
Go ahead and tilt the saw to a 45 degree angle. All the way over!
Lie your square blank up against the blade so it lies flush against it. Don't push or lean on it, just set it up flush against the blade up on one corner.
Then, slide the fence in so its flush against the corner of the square. Lock it down.
Wallah! That's all the measuring done. Now you're set to cut the blank. Remove your block and re-establish all safeguards and power to the saw.
I used a feather board, helped keeping that stray chunk of corner from skipping around and kept the blank nice and tight against the fence. Just be careful where you put your hands, as that blade does come out the left side of the block when cutting the corner. Use the push stick if you want to.
Congrats, now turn some wood!
I made it at Techshop!