How to efficiently level up to 40 in Pokemon go

Getting to level 40 is a humongous task in Pokemon go. Catching Pokemon and spinning pokestops is not be the best way to reach 40. The best way to reach level 40 is using friends. The amount of xp you gain for each friendship level is as follows:
- Good friend – 1 day – 3000 XP
- Great friend – 7 days – 10000 XP
- Ultra friend – 30 days – 50000 XP
- Best friend – 90 days – 100000 XP
The XPs you get from friendship is way more than what you get by catching pokemons and spinning pokestops. To make the best of friendship xp bonus:
- Ensure that you have at least 195 friends. The max limit of friends is 200. There are sites where you can post your friendship code like here.
- You get more XP by getting multiple good friends rather that increasing friendship levels.
- Great friend – 7 days – 10000 + 3000 = 13000 XP. But if you make 1 good friend for 7 days you get – 3000 * 7 = 21000 XP
- Ultra friend – 30 days – 50000 + 13000 = 63000 XP. But if you make 1 good friend for 30 days you get – 3000 * 30 = 90000 XP
- Best friend – 90 days – 100000 + 63000 = 163000 XP. But if you make 1 good friend for 90 days you get – 3000 * 90 = 270000 XP
- You can send 20 gifts a day and open 20 gifts. Which means you can earn upto 40 friendship level every day. Note: Do not send gift to the friend you just opened gift from and vice versa because you can only increase friendship level by one everyday.
- Invite 10 new friends every day (cleanup/remove 10 inactive or newly formed friend to make room) and send them gifts. This will ensure that you get 30000 XP everyday.
- Send the other 10 gifts to increase the friendship level of existing friends.
- If a new friend or a friend who requires one more day to increase the friendship level sends you gift, don’t open it yet. Once you have enough friends are like that, use Lucky egg and open the gifts.
- If a friend who requires 2 days to reach the next friendship level sends you a gift, do not open it. Send a gift instead and wait for him/her to open it.