You have to pay full rent for the month you are in the unit. For example, if you give the landlord notice on August 2nd that you want to be out by August 15th, you still have to pay all of August rent when it is due.
Keep proof that you paid the full rent. If you pay with cash get a receipt. If you pay by money order make a copy or take a photo of the money order with your landlord’s name filled in. Keep the receipt that shows you bought the money order.
Move by the date you gave in your written notice and return the keys to the landlord.
If you follow each of the 3 steps above your lease will end on the date you move out and you will not be responsible for rent for the months left on the lease. BUT, if you do not do these things exactly how the law says, you could be held responsible for the rent for the rest of the lease.
Note: Even if you end your lease using the 3 steps above you are still responsible for any money you owed to the landlord before you gave this notice.
IMPORTANT: If you end your lease using the 3 steps above your landlord gets to keep your security deposit, but you don't have to pay anything extra to the landlord be able to move out.