Note: This does not take travel to/from the airport into account.
The Wikipedia page on aviation safety has a nice table with deaths per journey, time and distance (based on data from the UK between 1990 and 2000):
- Car: 40 deaths per billion journeys, 3.1 deaths per billion km
- Aircraft: 117 deaths per billion journeys, 0.05 deaths per billion km
Assuming that car accidents are equally distributed along a journey, we only need to consider the 3.1 deaths per billion km. Further assuming that all aircraft accidents are related to takeoff and landing (i.e. once per journey), we only consider the 117 deaths per billion journeys. While the first assumption is probably reasonable (there are differences between types of road though), the second one is not quite true since aircraft can also develop problems during cruise.
With these basic assumptions, we can calculate when the expected number of deaths are equal:
$$ N_\text{death} = 117 \cdot 10^{-9} = 3.1 \times \frac{d}{10^9 \, \text{km}} \; \Leftrightarrow \; d = \frac{117}{3.1} \, \text{km} \approx 38 \, \text{km} $$
So any flight longer than 38km is safer than driving the same distance.
Let us now try to take the cruise part for aircraft into account. According to this page 20% of all fatalities are due to accidents during cruise. We can subtract 20% from the 117 deaths per billion journeys (so this only takes the parts of the flight into account that happen once per journey). Modifying the 0.05 deaths per billion km is not so straight forward. Since most of the distance is traveled in cruise, I am going to be conservative and just leave this number unchanged, therefore providing an upper limit on the deaths per km.
Now, we can make a more accurate comparison:
$$ N_\text{death} = 0.8 \times 117 \cdot 10^{-9} + 0.05 \times \frac{d}{10^9 \, \text{km}} = 3.1 \times \frac{d}{10^9 \, \text{km}} $$
$$ \Leftrightarrow \; d = \frac{0.8 \times 117}{3.1 - 0.05} \, \text{km} \approx 31 \, \text{km} $$
This is actually lower now, because the deaths during cruise are irrelevant for such a short flight. And this gives the final answer: Flights longer than 31km are safer by airplane than driving the same distance by car.