It would help if Trek fans would ever get over being butthurt about the fact that Star Wars has been, by far, the premier space science fiction franchise in the theaters since 1977. The least successful of the six Star Wars films made almost 100 million dollars more worldwide than the most successful Star Trek movie.
As far as people buying tickets to the movies are concerned, for over thirty years Star Trek has been in second place - and for most of that time a distant second.
That's a really flawed way of looking at things. Why don't you count the people who watched Star Trek on television? It's like saying the NFL is more successful than MLB because more people watch on average the NFL games than the MLB games, leaving out the fact that MLB has vastly more games a season (162 vs 16).
I mean yes the NFL does make more money than MLB but the point is you framed it in a way that made it more one-sided than it is.
I'm sure Star Wars has made more money if you count everything (toys, tickets, books, etc) than Star Trek but doing a pure movie vs movie comparison is ridiculous.
Star Wars is primarily a movie franchise, Star Trek is more television.