“Bioavailability” (F) is, in simple terms, defined as:


F = Fa * Fg * Fh

Where…
Fa = The fraction of the dose which is absorbed. 
Fg
= The fraction of the dose which escapes extrahepatic metabolism. (This
is common & is not given enough attention. Examples: CYP-mediated
metabolism in the intestinal wall, SULT-mediated conjugation in the
stomach, acetyltransferase-mediated metabolism of transdermals in the
skin, etc.)
Fh = The fraction of the dose which escapes metabolism by the liver. 

So if a compound taken orally was fully absorbed, and was not
metabolized into any degradation products before reaching systemic
circulation, it has an oral bioavailability of 100%. (F=1.0*1.0*1.0)
Theophylline is a good example of a drug with virtually 100% oral
bioavailability. 
If a different compound taken orally was 50%
absorbed, and half of the absorbed amount was metabolized in the gut,
and the other half of the absorbed amount was metabolized by the liver,
it has an oral bioavailability of only 12.5%. (F=0.5*0.5*0.5)

Pretty simple, I think.

…What has now become apparent is that there are only two
possible ways to increase oral bioavailability: (1) Increase absorption,
and (2) reduce the extent of first-pass metabolic reduction.


#1 is easy to achieve with compounds, such as steroids and triterpenes,
which are lipophilic and insoluble in water. Although they’re not well
emulsified or absorbed on an empty stomach, the body can emulsify them
using the same mechanisms used to solubilize dietary fats and
fat-soluble vitamins. These compounds/drugs should therefore be taken with food. There are multiple possible mechanisms involved…
–Food-induced
gastric and intestinal secretions can impact drug dissolution — bile
salts, phospholipids, free fatty acids from TAG hydrolysis, and food
components in GI fluids can help emulsify poorly-water-soluble
compounds. 
–Food-induced gastrointestinal PH changes can
improve the solubility of poorly-soluble acids. (Poorly-soluble bases
are less susceptible to this effect — and in some rare cases this may
even decrease bioavailability.)
–High-fat meals lead to the formation of chylomicrons in the small intestine. Chylomicrons are triglyceride/phospholipid/cholesterol-based
globules which incorporate lipophilic small molecules & deliver
them from the intestine to the bloodstream via the lymphatic system.
Compounds which have been incorporated into chylomicrons bypass
first-pass metabolism in the liver. 
–Meal consumption slows
gastric emptying, so compounds taken with meals spend more time in the
upper GI tract, and therefore have more time for
emulsification/dispersion.

…These effects, all taken together, can make a big
difference. The bioavailability of Danazol in humans was increased 400%
by the intake of a high-fat meal; its solubility in the GI tract
increased by 500%; Cmax, or ‘peak blood concentration’, increased by
~250%. (ref) Similar effects were noted in many other oral steroids, such as andriol (ref), progesterone (ref), norethisterone (ref), spironolactone (ref), megestrol acetate (ref); in other lipophilic drugs, such as cilostazol (ref), rutapidine (ref), fenofibrate (ref), rifalazil (ref), halofantrine (ref); and in natural triterpenes such as boswellic acid (ref).

When taken with food, the bioavailability of small hydrophilic compounds — such as caffeine, creatine, theophylline, metformin, ibuprofen, resveratrol, and morphine — typically does not change. But although the extent of
absorption will not change, the rate of absorption will be slightly
slower… Peak blood concentrations may take 30-160 minutes longer to
achieve, on average, due to delayed gastric clearance.


Food should not be taken with those (rather rare)
compounds which cannot passively permeate the intestinal membrane.
Absorption of these compounds into the bloodstream is carried out by
intestinal transporter proteins — such as the OATPs — and many
components in food and bile inhibit the function of these absorptive
transporters. Thyroxine (T4) and digoxin are OATP2 substrates and are
more bioavailable when taken on an empty stomach.
(Note: There
aren’t that many transporter proteins, and they’re easily saturated, so
drugs that are exclusively absorbed via transporters need to be
effective in very small doses — the two examples given, thyroxine and
digoxin, are both usually dosed in the micrograms.)

Even rarer are drugs, such as ciprofrolaxin and alendronic
acid, which form insoluble complexes with Ca or Mg. (From dairy
products, supplements, or antacids.) Drugs of this sort need to be taken
with lots of water on an empty stomach, or they can actually be
rendered totally useless.


So, to summarize food’s effects on bioavailability:
If you’re
taking oral androgens, lipophilic drugs, or lipophilic phytochemicals
such as ursolic acid or curcumin, take your doses with food. If you want
maximum bioavailability, take them with a high-fat meal.
If
you’re taking small hydrophilic drugs or phytochemicals orally, food
won’t influence bioavailability… But if you’re taking ibuprofen for a
headache, you’ll probably want to take it on an empty stomach.
Conversely, if you want to delay caffeine absorption, take it with
food… 
If you’re taking anything which is a
transporter-protein substrate and cannot permeate the intestinal wall
via diffusion, or if you’re taking anything which can form a complex
with dietary minerals, take it without food & on an empty stomach.

So much for that. 

There are more things to discuss when speaking of oral
bioavailability — in particular, other ways to possibly increase it —
but I think I’ll write about that another time.