I'm looking to take the train from Stockholm to Copenhagen in July of next year. From what I've seen it's about a 5-6 hour ride, but I haven't seen the prices. How much was the train? Would it be cheaper to fly? What website can you book tickets on?
I'd just fly it. See Norwegian.com for pricing on Norwegian Air Shuttle--a big budget carrier.
This reliable source should answer your questions: http://www.seat61.com/international-trains/trains-from-Stockholm.htm#Stockholm-Copenhagen
The link to the man in seat 61 should give you all the practical info. If you are willing to travel at odd hours and book in advance it can be quite cheap. Also when you compare prices, be sure to include the price of getting to and from the airports. The Arlanda Express train in Stockholm is 280 Se Kr. for a single fare. there are cheaper bus options, but it is slower. The metro or train in Copenhagen is 36 DK Kr.
Time wise, the trip with the direct train is not much longer than the flight, if you include the total travel time from city centre to city centre (getting to and from the airport, security, baggage reclaim etc.). The direct train has the advantage of going from city centre to city centre hassle free. I do the trip a few times a year for work and I fly, but I only carry hand luggage and I know my way around the airports and train stations, so it's less of a hassle.
Would it be reasonable to make trip from Stockholm --> Oslo --> Copenhagen --> Stockholm by train? I don't mind if it takes longer, I would just like the least expensive option. I'll probably be staying in hostels or AirBnB in the city centre anyway. I'm going to Stockholm for work and would like to extend the trip to go to Olso and Copenhagen for 1-2 days each.
That makes it a totally different trip. Use www.seat61.com/ to get an impression of times and prices. I'd say the leg from Oslo to Copenhagen is best done flying.
If you haven't already booked your trans-Atlantic tickets, see if you can fly into Stockholm and out of one of the other cities; no need to backtrack to Stockholm just to fly home. These flights can be booked using the "multi city" or "multiple destinations" tab, rather than "one way" or "round trip," on Kayak, Google Flights, SAS, etc.
To find airlines and prices on these routes, use Skyscanner: http://www.skyscanner.com/. However, be sure to look at the airline's own website to learn all the rules and extra fees. Booked in advance, a flight might even be cheaper than a train, but do take into account Morten's point about the cost of getting to the airports (potentially high in Stockholm and Oslo).
If you really have more time than money, you can investigate buses between the cities. Look at Rome2Rio to learn the companies, then check their websites for prices: http://www.rome2rio.com/
Flying into one city and out from another definitely makes sense and the price probably won't be much different.
Within Scandinavia, don't expect trains to be cheaper than flights. By booking ahead, you'll find very competitive flight prices. Oslo-Copenhagen can also be done by DFDS overnight ferry.
Swedish train ticket prices vary widely (from 195 to 946 SEK in standard class from Copenhagen to Stockholm) depending on how early you book, time of day, and whether you want a fare that's changeable or refundable. See examples at www.sj.se, currently bookable for travel through February.
If you do need 3 or more days of train travel, you can consider a Eurail Scandinavia Pass currently on a 20% off sale, which makes it $202 for 3 days of travel within a month. That sale is just offered through Dec. 30 but there could be other deals next year. Some trains require a separate seat reservation fee.