Which is more basic, piperidine or pyrrolidine and why?
I think I may have a possible insight into the small difference. Wikipedia gets the pKa from J. Am. Chem. Soc. 1957, 79 (20), 5441–5444 and lists pyrrolidine at 11.27 and piperidine at 11.22.

Calculating the equilibrium structures (B3LYP 6-31g*) for both species in their neutral and protonated states, I found something interesting.


  For piperidine


Neutral and protonated species both achieve the optimal staggered conformation about all bonds.


  For pyrrolidine


For the neutral species, the C-C bonds have their hydrogens in an eclipsed conformation. In the protonated species, the ring gets a slight twist, which allows the C-C bonds to have their hydrogens in a staggered conformation.


  So...


The hydrogens being moved into a staggered conformation upon protonation of pyrrolidine could be the source of the extra stabilisation of the protonated form.

I'm also thinking if the cation form is favoured slightly more in pyrrolidine because its aliphatic portion is less, thus leading to a bigger release of solvation energy upon protonation (calculated to be 1 kJ/mol more favourable for pyrrolidine, but this could be within the error of the method).

If I had to pose arguments for this small difference in basicity, these would be the ones I'd choose.