I've come across something and always wondered about it, what is the meaning
of

> "なんてこったいこりゃいったい"?

I assume (but I'm not quite sure) that it's this: to show disbelief or
surprise

Also, is this something actually used? (and if it is, in what context?)
CC BY-SA 4.0
2017-10-01T20:58:19.547
53586
2020-12-21T22:04:28.460
2020-12-21T22:04:28.460
29327
25998
question
slang
"なんてこったい こりゃいったい" is this some kind of slang?
Yes it is, but there your text has two parts:

> なんてこった （い）

which is an exclamation that roughly translates to "oh no", and

> こりゃいったい

which means "just what (is this)...".
CC BY-SA 3.0
2017-10-02T01:18:36.990
53590
2017-10-02T01:18:36.990
25446
53586
answer
> なんてこったいこりゃいったい

is a colloquial, slurred pronunciation of 「なんてことだい、これはいったい」

which is a reversed version (倒置) of 「これはいったい、なんてことだい？」

To break it down...

なんて -- pronoun [何]{なん} + case particle (っ)て; ≂「なんという」  
こったい -- noun こと (事) + copula だ + sentence ending particle い (≂よ)  
こりゃ -- pronoun これ + particle は  
いったい -- noun 一体 (used for emphasis in questions; "on earth")

So it _literally_ means... "What kind of thing on earth is this?" "What on
earth is the matter?" -- used as an exclamation, like "What the hell is this?"
CC BY-SA 3.0
2017-10-02T02:11:19.033
53593
2017-10-02T02:21:20.243
2017-10-02T02:21:20.243
9831
9831
53586
answer