1- Stockholm to Uppsala by Train
Taking the train from Stockholm to Uppsala is a smart choice. It takes only about 40 minutes, and trains leave each city's central station at least twice hourly. This transportation option is flexible, and at around SEK 100 (EUR 10) for a round trip ticket, very cheap.
From Stockholm Arlanda Airport - found in the middle between Stockholm and Uppsala - the journey by train only takes 20 minutes, but costs more.
The trains are operated by Swedish Railways, where you can also buy tickets online.
2- Stockholm to Uppsala by CarIf you'd like to rent a car to get from Stockholm to Uppsala, it makes for a very nice drive. Take the E4 north and you'll reach Uppsala after 60 km (37 mi).
Getting from Stockholm to Uppsala (and back) by car will take you about 50 minutes, so it's not faster than the train. It is likely to be more expensive with the rental cost and local gas prices. Choose this option if you want to be completely independent of connection schedules.