The range of an airplane is affected by weight, altitude, airplane configuration, and center of gravity location.
Weight
Higher weight means the wings must generate more lift to carry that weight. More lift means more induced drag. Higher induced drag means more thrust to counter that drag. More thrust means more engine power is required and more fuel is burned.
Altitude
The air thins with altitude. As a result, an airplane flying at a higher altitude will fly faster and burn less fuel, yielding a greater range.
Airplane Configuration
A clean configuration, minimizing drag, is required to achieve maximum range. Pilots must recognize that if a system failure causes the flaps or gear to remain in a position other than fully retracted, the lack of configuration will increase drag and reduce the range of the airplane. The airplane may no longer be able to reach its destination. The pilot will have to make the determination whether it is safe to continue the flight in the dirtier configuration or whether an alternative course of action must be pursued.
C.G. Location
A C.G. nearer to the airplane's rear C.G. limit will cause the airplane to require less tail down force during flight. Drag is lower, and range is greater.
When calculating fuel requirements or determining whether an airport can be reached without a fuel stop, remember to make all the adjustments required by the manufacturer. For example, manufacturers may place a note on the range performance chart stating corrections to be made for wind. The wind has a significant effect on the range of an airplane and must be accounted for.
The following two charts were taken from two different aircraft manufacturers. They show examples of how different manufacturers might portray range performance in their respective Pilot's Operating Handbook's.
Maximum Endurance
Endurance is different than range. Endurance refers to staying aloft for a maximum period of time, whereas range refers to going the furthest possible distance. Maximum endurance occurs at an airspeed where just enough fuel is burned to keep the airplane aloft. The maximum endurance airspeed is usually less than the maximum range airspeed.
Example endurance chart:
In order to aid you in determining how to setup the engine during cruise flight, manufacturers often include a chart such as the one below...