It may not match exactly as older paint often changes color as the pigments age and degrade; and new paint can be formulated with slightly different amounts added. If its really noticeable you would have to repaint the whole wall.
So I had sharpie marks around my room and I still had a sample of the paint I used to paint my room so I got the paint. The problem is that it seems the new paint looks a little lighter than my room color. Is it suppose to gradually match into the old paint or?