Do this:
So far, I do them by intuition and zoom in a lot to make them look properly formated.
OR
In Illustrator, use guides and CTRL-U or APPLE-U for smart guides.
The latest versions of Photoshop has the ability to automatically detect edges to help you line things up as well.
https://www.graphicsdump.com