The calculated distance (air line) between Šmarje pri Jelšah and Ljubljana is approximately 50 miles respectively 81 kilometers.
By car or train, the actual journey to Ljubljana is certainly longer, as only the direct route (as the crow flies) between Šmarje pri Jelšah and Ljubljana has been calculated here.
Air line (approximately)
81 kilometers
43 nautical miles