just visualize doing the job & figuring out how long it'll take me. Who will be helping me, how long to set up, how many ladder movements, how long to prep, how long to apply, how long to clean up, etc. Figure out how many days I'll be there & times that by the daily labor rate per guy + materials + daily overhead & so on. For interiors I have my own personalized sq ft formula I go by to check my estimate against to see if I'm in the right timeline or totally missing something on larger jobs. To do that you need to know how much you can paint in how much time. How long does crown take you per foot, base per foot, different types of doors per coat per side, and so on. For exteriors it helps to snap photos & look them over when you get home as what you saw in person can become a little fuzzy & seem alot easier or harder than it really is.
Every painter has different labor rates, different profit goals, different overhead costs, different experience, and different quality.