How long should a fever last?

Had it for 4 or 5 days now. Ive had head aches, a slight cough, and eyes were a little sore. I was feeling my best today then all of the sudden I was ready for bed and my temp. Shot up from 97 to 102. I’m 17 years old. I took 2 ibuprofen about 15 minutes ago. I heard it could last up to weeks almost.
0