For tourist Brazil visas you are allowed to stay for up to 90 days per entry into Brazil. You can request an extension for up to 180 days once you have entered the country, but this is not guaranteed. Unless you are granted a special visa (i.e. student, long-term work, retirement) you cannot stay in Brazil more than 180 days per year. Please keep in mind that in order to apply for the Brazil visa, your ticket must show a departure date no longer than 90 days after entry.