Upvote:1
From the UK government's website, if you're a non-EEA national, the length of time you might be banned for is as follows:
In your case where you left voluntarily using your own funds, a 12-month ban will likely be applied from the date you left.
Upvote:2
There are two reasons why your application may be rejected:
The duration of a ban depends on many factors (as it seems), including on which visa you were in the UK the last time, whether you left voluntarily, and who paid for your departure. https://www.gov.uk/guidance/immigration-rules/immigration-rules-appendix-v-visitor-rules contains some information. The minimum ban seems to be 12 months if you paid for your departure yourself. You can find the rules for other cases on that site as well.
However, even if your application may not be rejected due to a ban, there is still the question of whether the embassy will trust that you stick to the rules this time. This is the difficult part as overstaying for years looks very bad. If you want to have a chance, you need to collect conclusive evidence that overstaying will not happen again. Depending on why you overstayed the last time, this is difficult.
Having said that, you may want to get professional help here, which means hiring an immigration lawyer. An overstay of years is not a trivial matter, so someone experienced with such cases should be able to determine your chances in a better way.