It is a common misconception among people that they need to wait till the expiry date of their visa and apply within 28 days of such expiry date.
I would like to clarify that an individual(a non-EEA national) qualifies for ILR after completing their qualifying period, which is 5 years for most categories (except the 10 year long residence category) and usually this is well before the expiry date of the visa.
Hence, you should always count the 5 years from the date of the issue of your first visa under the category and then count 5 years from that date.
For example, if your first visa was issued on 12 January 2013 and your current visa expires on 15 February 2019, then you are not required to wait till 28 days before 15 February 2019, you should count your 5 years of qualifying period 12 January 2014, so you would qualify for ILR on 11 January 2019 and you can apply for ILR within 28 days of 11 January 2019, i.e. from 15 December 2019 onwards. The same calculation would apply for a 10 year Long Residence application.
For further details and list of documents required in support of the application visit the page: https://www.visa-solutions.co.uk/ilr-indefinite-leave-to-remain