In 2000, I bought my last rail pass, a 5 day German Rail pass. It was a 2 week trip; I used the pass for the five most expensive legs of the trip. When I came home I used the German Rail website to find the walk-up ticket price of those legs, and I found I just barely came out ahead with the rail pass.
Since then I've learned a lot about using Saver Fares (advance purchase tickets for long distant trains) and regional passes (Länder-Tickets, for regional trains all day in one German Land, like the Bayern-Ticket).
My last three trips were one 14 day trip alone and 2 3-week trips with my late partner, each trip with nine legs for which a rail pass could have been used. On each of these trips (55 days, total), I had 9 days of travel where I could have used a rail pass. I didn't spend close to $365 for tickets on any of these trips.
Now, maybe my mode of travel is a little different from a lot of people. I tend to exploit one area, making a lot of short, local trip, rather than making vast leaps, trying to see the whole country in a few days.
But my point is, instead of just assuming that a rail pass will pay for itself, do an analysis. Look at your itinerary, what rail connections you will be making, and how much things like Länder tickets and other regional passes might cost for those connections, and what advance purchase Savings Fare tickets will cost. You might be surprised.