Anything with "습니다" is formal speech.
However, 고맙습니다 (pure Korean) is currently slightly less formal than 감사합니다 (Chinese-derived). Lots of Korean is derived from Chinese characters called 한자 in Korean (similar to Kanji in Japanese).
With recent generations, 고맙다 is replacing 감사하다 because Koreans want to speak pure Korean. Given enough time, I expect 고맙습니다 to be the standard.
Don't address great-grandma with 고맙습니다, but for the most part if you speak to someone younger than 50 years old-- they will appreciate it and instantly know you understand the modern culture.