That depends on what you want to do! If you're looking to spend most of your time relaxing on the beach and eating nice food, then we recommend staying for two weeks. This will give you plenty of time to relax and soak up the sun!
If you're interested in exploring the coastline and visiting the charming villages and towns, then a week should be enough. Algarve is a beautiful destination with a lot of things to do, so make sure you give yourself plenty of time to explore.