"Stand up comedy", "standup comedy", or "stand-up comedy"?
The Guardian Style Guide says:
standup
adjective, as in a standup comedian performing standup comedy; and noun: a standup performing standup
Generally, it's a matter of grammar whether to space words or hyphenate. And generally, it's a matter of style or usage whether to hyphenate or join the words together.
For example:
I log in to my computer and enter my login details.
Here log in is an action, and login describes my personal details. Login could be hyphenated, and often hyphenated words lose their hyphen over time and with use. We used to say to-day and to-morrow.
The Guardian Style Guide again:
hyphens
Our style is to use one word wherever possible. Hyphens tend to clutter up text (particularly when the computer breaks already hyphenated words at the end of lines). This is a widespread trend in the language: "The transition from space to hyphen to close juxtaposition reflects the progressive institutionalisation of the compound," as Rodney Huddleston puts it, in his inimitable pithy style, in his Introduction to the Grammar of English.
See the rest of their hyphen entry for more.
Wow! 12 hours, and nobody's done the Ngram yet?
Not that Ngrams are always right, nor should they be accepted as the final word, but it looks like the hyphonated form gets used most often, and that's how this scholar chose to write the term:
Although that doesn't mean the other format isn't also accepted in publication:
As a footnote, even stand-up comics wonder about etymology sometimes:
Whose cruel idea was it for the word “Lisp” to have a “S” in it? (George Carlin)