Have you ever used something like fitday.com or calorie-count.com? Those will calculate those for you.
Alternately, you can manually write down the macros (in grams) of everything you eat, total each macro up individually, then multiply each total in grams by the number of calories in each gram (fat = 9 kcals per gram, protein & carbs are 4 kcals per gram, etc - you can find this with a google search). Then, divide those totals by your total calories.
For example, if I ate 1800 calories today and 120g of protein, I would calc:
120g x 4kcal/g = 480kcal
480/1800 = .26666 or 27%
that's kind of a pain in the ass though.
