Both build fitness. Outdoors you work a little harder because there's no belt moving you and no still air; that's why many runners set the treadmill to a 1% incline so the effort feels closer to running outside. The best plan is to use both depending on your week and the weather.
Main differences
Treadmill
Outdoors
Effort at the same pace
Slightly lower
Slightly higher (wind, terrain)
Pace control
Exact
Varies with hills and lights
Impact
Belt with some cushioning
Depends on the surface
Weather and safety
Always the same
Heat, rain, traffic
Motivation
Can get boring
More variety
When the treadmill makes sense
Intervals at an exact pace.
Bad weather, strong heat or running at night.
Coming back from an injury with full control.
When outdoors makes sense
If your 5K or 10K race is outside.
To train real hills, turns and pace changes.
To stay entertained on long runs.
1%
incline to feel like running outside
2
surfaces to vary the impact
“
If your goal race is on the road, do at least half your kilometers outside.