Hi
I am sorry to say but 40 percentile is too low. Assuming you are general category your rank should be around 371,782 to 457,626. The cutoff for jee mains general category is 88- 95. With this score you won't be able to appear for jee advanced.
To get more accurate result about your rank visit:
JEE Main Rank Predictor - Know your expected IIT JEE Main 2021 Rank by ...
and to see which college you are eligible for visit:
JEE Main College Predictor – Know your College Admission Chances Based ...
i suggest you study hard and sit for jee mains once again with better preparation and get into nits or iits.
Best of luck
Hope this helps
Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile