Typically, a bacterial infection has more severe symptoms than a viral infection.
For example, there is usually a higher fever
, more sputum
production, etc. Your doctor may be able to determine this by examining you. Sometimes, further testing, like a sputum culture, may be necessary but often the diagnosis can be made by your doctor on clinical grounds alone.