Turkey has an efficient E-Visa system in place for tourists, although currently you can still buy a tourist visa stamp at the port of entry these facilities are being phased out and a proposed transition period where E-Visa terminals are provided at airports is planned but soon you will have to apply for the Tourist E-Visa before you arrive in Turkey.
The E-Visa is valid for a 90 Day stay in a 180 Day period - please see HERE for a visa calculator to work out your stay
The official E-Visa website is - https://www.evisa.gov.tr/en/
IMPORTANT: Your passport must have at least 6 months before expiry after the date of entry AND 3 months before expiry after your date of departure.
e-Visa fee varies according to country of travel document and type of travel document. Please, click the “Apply” button on the official E-Visa website homepage and select your country of travel document to find out the e-Visa fee that you are required to pay.
There are sites claiming to offer E-Visa services that charge a large premium for doing the easy application for you, please be aware that only - https://www.evisa.gov.tr/en/ - is the official one and you may end up paying a lot of money for a simple application procedure elsewhere, please only use the official site.
See the video below for an easy guide to applying for you E-Visa