We study the geometry of needle-shaped domains in shape-memory alloys. Needle-shaped domains are ubiquitously found in martensites around macroscopic interfaces between regions which are laminated in different directions, or close to macroscopic austenite/twinned-martensite interfaces. Their geometry results from the interplay of the local nonconvexity of the effective energy density with long-range (linear) interactions mediated by the elastic strain field, and is up to now poorly understood. We present a two-dimensional shape optimization model based on finite elasticity and discuss its numerical solution. Our results indicate that the tapering profile of the needles can be understood within finite elasticity, but not with linearized elasticity. The resulting tapering and bending reproduce the main features of experimental observations on NiAl.