Ketogenic compositions include a racemic mixture of R- and S-beta-hydroxybutyric acids and a racemic mixture of R- and S-beta-hydroxybutyrate salts. The compositions contain the R-enantiomer to elevate ketone bodies and increase the rate at which ketosis is achieved and yet contain an equivalent amount of the S-enantiomer to provide alternative benefits. The R- and S-beta-hydroxybutyric acids are more rapidly absorbed and utilized by the body than salts or esters, enhance taste, and reduce the need to include citric acid or other edible acids. The R- and S-beta-hydroxybutyrate salts are more slowly absorbed and utilized by the body and can provide one or more electrolytes. The ketogenic composition may contain a dietetically or pharmaceutically acceptable carrier and a racemic mixture of R- and S-beta-hydroxybutyrate salts and acids. The composition contains less than 100% by molar equivalents of total R,S-beta-hydroxybutyrate salts and more than 0% by molar equivalents of R,S-beta-hydroxybutyric acids.