A number of medications, diseases and other reasons can make you cough up blood. Some of the main causes of this problem are as follows:
• A blood clot in the lung
• Bronchitis
• Lung cancer
• Good pasture syndrome
• Cystic fibrosis
• Tuberculosis
• Pneumonia
• Throat irritation from extreme coughing
• Pulmonary edema
• Laryngitis
• Inflammation of the blood vessels in the lung
• Spirometry
• Bronchoscopy
If the problem is persistent then it could be a sign of a major problem. You have to seek the help of your doctor immediately to identify the issue.