It's not an easy problem to solve and we've wrestled with this on Workshape.io (matching platform for Software devs). The formula we've come up with is a 4 level hierarchy based not on experience or times served but on the role you play within the team.
Entry - you are competent, but need guidance / supervision / mentorship. Your code will be reviewed before deploy
Mid-level - you are competent but do not lead or manage
Senior - you are still hands on, but do lead and manage others
Lead - you may still be hands on but managing / leading / deciding are the most important things you do.
Its still our categorisation though and we know it's not perfect at all