is it grammatically correct to say on accident?
A less commonly used variant of by accident, on accident is almost exclusively used in the United States. Even there, no one uses 'on accident' in writing, its only a spoken English term. In fact, it is considered incorrect to be used in written form.