'How long have you been here?' sometimes people answer three years, when they mean since yesterday. Similarly, learners get confused about this question 'how long are you going to be here?' and may answer since yesterday, when they mean three years.
It's because these questions are complex. They contain aspect, as well as tense, and not all languages refer to tense and aspect in these ways.
Let's start with 'how long have you been here?'. The 'have been' part of the question means something that began in the past and is still a fact now. We can answer the question by referring back to the date, in the past. For example, since the 3rd of April 2013.
Or we can refer to the period of time since the date we arrived up until now and say for seven months. If now is about the 3rd October 2013 the point is that we are looking backwards to the past and connecting the past to the present time.
This is very different in meaning to 'how long are you going to be here?'. We need to explain the 'are you going to be' part of the question. First, we use going to state our attention to go somewhere very soon means to exist or stay. So the meaning of the question 'how long are you going to be here?' is really how long do you intend to stay here. It's a question about your plans for the future.
If you have a plan to stay, you can answer the question with time you intend to stay. For example, about three days if you don't have plans well you can be honest and say 'I don't know yet'.
So to sum up a question 'how long have you been here?' refers to the past up until now and the question 'how long are you going to be here?' refers to your plans for the future.
Watch to understand the differences between these questions and when they should be used.