I see this thinking a lot, but I honestly don't understand how you can meaningfully compare something you've done with something you haven't.
Practice doing it, and soon you'll be able to do it accurately yourself. Think of a typical website.....the content is different, but the structure is just a bunch of pages, storing stuff in a database, maybe doing some authentication. A difficult project would be inventing a new algorithm. That's rare, and working on projects that are completely unrelated to anything you've done before is equally rare.
If you're working on a two-week sprint, by practicing and noticing how accurate your estimates were, then within two months you'll find that 80% of your estimates are accurate.
Caveat emptor: if you have a manager constantly pushing to make your estimates shorter, then learning to make accurate estimates is very hard.