Calculate mileage for back tax revision: How to determine miles for points to or from destination?

I am self-employed and one of my businesses is in home health. From my home office, I drive to clients' homes.  For the past several  years, I kept a notebook log of my miles driven with all gas receipts. In some months, I could put on 1500 or more miles as I can go multiple clients in one day but on a fixed schedule. Unfortunately, before I could file my 2017 taxes, I lost the notebook, so I filed my taxes without putting in the mileage deduction. I just found that notebook, so now I want to amend my taxes for last year. But in doing so, it brings up a question: Do I track miles just going to (but not from) a particular client's home for leaving that home?  How do stops along the way affect mileage? I am also a part-time student, and currently my school is physically located in between regular client stops. Let's say this scenario: 

 

6:30 a.m. Leave home to go to Client A's home.

7:30 a.m. Arrive at Client A's home. Work with Client A until 11:30 a.m.

11:30 a.m. Leave Client A's house and head to Client B.

12:00 a.m. Arrive at Client B's home. Work with Client B until 2:00 p.m.

2:00 p.m. Leave Client B's home and go to school. The commute takes 30 minutes, to make it for a 3:00 p.m. class.

3:00 p.m. Arrive at school. Class lasts until 4:30 p.m.

4:30 p.m. Leave school and head home for dinner.

5:30 p.m. Leave home and go to Client C's home.

6:00 p.m. Arrive Client C's home and work with Client C until 9:00 p.m.

9:00 p.m. Leave Client C's home and return home.

9:30 p.m. Arrive home.

 

In this scenario, do I only count the miles when I go from the home office to work, or also when I leave, and how does going to school (which is on the way, between two client's homes) affect mileage?

 

Note: I have a dedicated home office in its own dedicated room, with its own computer, printer, fax, and a separate room. I have two other side businesses, both of which also require me to drive but not as much as the home health work. I have a separate bedroom, in which I have all my school books.

 

Lastly, last year I bought Quickbooks for my phone and use that mileage tracking feature, but the new federal tax laws, I think tracking that mileage is not necessary. (I filed an extension anyway because of other issues).

 

Thanks for reading this long post.