Scattering lengths for two pseudoscalar meson systems, ππðI ¼ 2Þ, KKðI ¼ 1Þ and πKðI ¼ 3=2; 1=2Þ, are calculated from lattice QCD by using the finite size formula. We perform the calculation with N f ¼ 2 þ 1 gauge configurations generated on 32 3 × 64 lattice using the Iwasaki gauge action and a nonperturbatively OðaÞ-improved Wilson action at a −1 ¼ 2.19 GeV. The quark masses correspond to m π ¼ 0.17-0.71 GeV. For the πKðI ¼ 1=2Þ system, we use the variational method with the two operators, su and πK, to separate the contamination from the higher states. In order to obtain the scattering length at the physical quark mass, we fit our results at several quark masses with the formula of the Oðp 4 Þ chiral perturbation theory and that includes the effects of the discretization error from the Wilson fermion, Wilson chiral perturbation theory. We found that the mass dependence of our results near m π ¼ 0.17 GeV are described well by Wilson chiral perturbation theory but not by chiral perturbation theory. The scattering lengths at the physical point are given as a