We exploit a large reform of capital-gains taxation in Germany combined with portfolio-level daily panel data to study the causal effect of taxes on individual stock-trading behavior and the disposition effect. We find substantial spikes in selling probabilities around an intertemporal tax discontinuity, and no such spikes after the abolishment of the discontinuity. Using difference-in-bunching methods, nonparametric regressions and effective tax rates, we quantify the tax effect and identify interesting patterns of heterogeneity. We further find evidence that the wellestablished disposition effect is strongly affected by the tax discontinuity through tax motivated selling of both gains and losses.