Cortical computations are critically dependent on interactions between pyramidal neurons (PNs) and a menagerie of inhibitory interneuron types. A key feature distinguishing interneuron types is the spatial distribution of their synaptic contacts onto PNs, but the location-dependent effects of inhibition are mostly unknown, especially under conditions involving active dendritic responses. We studied the effect of somatic vs. dendritic inhibition on local spike generation in basal dendrites of layer 5 PNs both in neocortical slices and in simple and detailed compartmental models, with equivalent results: somatic inhibition divisively suppressed the amplitude of dendritic spikes recorded at the soma while minimally affecting dendritic spike thresholds. In contrast, distal dendritic inhibition raised dendritic spike thresholds while minimally affecting their amplitudes. On-the-path dendritic inhibition modulated both the gain and threshold of dendritic spikes depending on its distance from the spike initiation zone. Our findings suggest that cortical circuits could assign different mixtures of gain vs. threshold inhibition to different neural pathways, and thus tailor their local computations, by managing their relative activation of soma- vs. dendrite-targeting interneurons.