How does a Decision Tree make predictions?

Updated Feb 20, 2026

Short answer

A decision tree makes predictions by following a path of rules from the root node to a leaf node based on input features.

Deep explanation

When a new data point is given, the decision tree starts at the root node and checks the first condition (for example, “Is age > 30?”). Based on the answer, it moves down the corresponding branch. At each internal node, another condition is evaluated using a different feature. This process continues until the model reaches a leaf node, which contains the final prediction (such as a class label like “Approved” or a numeric value like “House price = 200K”).

The key idea is that each step reduces uncertainty by narrowing down possibilities. The tree essentially partitions the feature space into regions where each region corresponds to a specific output.

Real-world example

In medical diagnosis for diabetes:

  • Is blood sugar > 140?
    • Yes → Check BMI
      • BMI > 30 → High risk
      • BMI ≤ 30 → Moderate risk
    • No → Low risk

A patient’s test results are passed through this path to reach a diagnosis.

Common mistakes

  • - Thinking the tree evaluates all conditions at once (it follows one path only).
  • - Assuming predictions are probabilistic at every node (only leaves give final output).
  • - Ignoring that small changes in data can change the path and prediction.

Follow-up questions

  • What happens if a value is missing in a decision tree?
  • How does a tree handle continuous vs categorical features?
  • Why are decision trees easy to interpret?

More Decision Trees interview questions

View all →