A few years ago, I aimed to reverse-engineer the crafting system in D&D 5e and find a better formula for balancing custom magic items. I'm really proud of what I came up with, and it was fun to see how several existing magic items in the DMG fit it more or less perfectly. Re-reading that post gave me the urge to look at some more, so let's get started!
I highly recommend you read the original post here before continuing this one, but below is a cheat sheet with the basic formula and guidelines I came up with.