What is the TOEFL vs IELTS decision for you?
Take the TOEFL if you are comfortable speaking aloud to a machine, if you want more test centre options, if you are on a tighter budget in the US, or if the programs on your list only accept the TOEFL. Take the IELTS if a face to face speaking interview plays to your strengths, if you are applying to a UK, Australian, or New Zealand program where IELTS is the norm, or if the IELTS Academic suits your reading needs better.
One more factor, which is the availability of good preparation material for your own speaking style. If you are someone who reads well but freezes when asked to speak to a person, the TOEFL removes that variable entirely. Our guide to study abroad entrance exams covers the other tests you will meet in the same application cycle.
One more practical point decides many of these tests. Test centre availability is not the same for both exams. The TOEFL runs in a computer based format at many locations, including some smaller cities. The IELTS interview is conducted in person by an examiner, so there are fewer locations and the booking calendar fills earlier in the year. If you live more than an hour from a major city, check which test has a centre near you before you spend money on preparation material.
Scores stay valid for two years for both exams, so the timing question is usually about when you apply rather than when you sit the test. If your application deadline is more than a year away, you have room to sit the test once, look at your section by section results, and decide whether a retake would help. That is cheaper than paying to retake a test you were not ready for.
How should you prepare?
Start with a diagnostic, because both tests have free practice tests and both are hard to pass cold. A TOEFL vs IELTS diagnostic tells you something different for each test, so run the one for the exam you are actually going to take. Take one full timed practice under real conditions, mark the sections that cost you time, and fix those first. Then work on the sections that are scored by a human or by speech recognition, because those are the least predictable.
Plan on six to eight weeks for most applicants, longer if your first language is not English. Book the test date before you finish preparing, so you study against a deadline, and remember that both scores stay valid for two years, which gives you a fallback if your first attempt lands below the line.