Chudnovsky and Seymour proposed the Three-in-a-tree algorithm which solves the following problem in polynomial time: given three fixed vertices in a simple finite graph, check whether an induced tree containing these vertices exists. In this paper, we deal with a generalization of this problem, referred to henceforth as k-in-a-tree. The k-in-a-tree checks whether a graph contains an induced tree spanning k given vertices. When k is part of the input, the problem is known to be NP-complete. If k = 4 is a fixed given number, its complexity is an open question, although there are efficient algorithms for restricted cases such as claw-free graphs, graphs with a girth of at least k and chordal graphs. We present mixed-integer programming formulations for this problem, and we show that instances with up to 25,000 vertices can be solved in reasonable computational time.