What is the correct spelling, dammit or damnit? And what is the difference?

Just writing this question brings up a red squiggly underneath damnit and the suggestions include dammit and damn it.


Solution 1:

The usage stats from the British National Corpus (BNC) look as follows:

            ALL SPOKEN FICTION MAGAZINE NEWSPAPER ACADEMIC NON-ACAD MISC

dammit      125    3      99       3        8        0         7      5
damnit        no results
damn it     158   12     137       1        1        0         2      5

And here are the stats from the Corpus of Contemporary American English (COCA):

            ALL SPOKEN FICTION MAGAZINE NEWSPAPER ACADEMIC

dammit      763   20     647      60       30        6    
damnit       94    2      86       6        0        0
damn it    1307   83    1112      58       36       18

The Corpus of Historical American English (COHA) paints the following picture:

Damnit vs. dammit vs. damn it vs. darn it

(X axis: year, Y axis: incidences per million words)

Solution 2:

Damnit could be used, though you're better off with "dammit" or "damn it". As per Wiktionary:

damnit
Nonstandard contraction of damn +‎ it
Interjection (especially southern US)
Common misspelling of dammit.

Edit: As my answer points out, "damnit" is considered a misspelling of the more popular "dammit", which confirms ЯegDwight♦'s data.