Personally, I haven't done this in a few years. However, I searched online as well as the Renfe website, and it seems that most tickets are available 62 days ahead, but not really much earlier. If I were you, I'd check back often, especially for Holy Week, since that week will be so popular, and tickets may go on sale earlier. Just now I did a "test" to see if any tickets were available between Madrid and Sevilla, and the latest I could purchase was for March 7 -- which is 62 days from now. Buena suerte!