Titanium surface treated with titanium oxide nanotubes was used in many studies to quantify the effect of surface topography on cell fate. However, the predicted optimal diameter of nanotubes considerably differs among studies. We propose a model that explains cell adhesion to a nanostructured surface by considering the deformation energy of cell protrusions into titanium nanotubes and the adhesion to the surface. The optimal surface topology is defined as a geometry that gives the membrane a minimum energy shape. A dimensionless parameter, the cell interaction index, was proposed to describe the interplay between the cell membrane bending, the intrinsic curvature, and the strength of cell adhesion. Model simulation shows that an optimal nanotube diameter ranging from 20 nm to 100 nm (cell interaction index between 0.2 and 1, respectively) is feasible within a certain range of parameters describing cell membrane adhesion and bending. The results indicate a possibility to tune the topology of a nanostructural surface in order to enhance the proliferation and differentiation of cells mechanically compatible with the given surface geometry while suppressing the growth of other mechanically incompatible cells.