How do you tell the difference between asthma and being out of shape?

Pulmonary functions. Pulmonary function testing while symptomatic can usually be used to confirm the presence of asthma.
It's not always easy. Either being out of shape or asthma can make you feel short of breath when you exercise. An allergist or pulmonologist can have you do a lung function test before and after exercise to see if you are having exercise-induced bronchospasm. Your doctor can give you an asthma inhaler, and you can take it before or after exercise. If it helps, you probably have some asthma.