The purpose of this research is to assess how season, ADG, opportunity costs of farm-grown feeds, pig weight, and butcher price variation impact the economic potential of semi-intensive pig rearing. We developed a unique algorithm that emulates least-cost pig feeding and used it to assess the impact of the aforementioned factors on farmers' maximum revenue and profit potential when pigs are sold to local butchers in western Kenya. When considered as independent factors influencing feed costs to grow a pig to a market weight of 30 kg, variation in ADG, opportunity cost of feed, and weaning season resulted in feed cost differences of up to 982, 947, and 379 Kenyan shillings (KES), respectively. The variation in revenues attributable to butcher or butcher negotiation and seasonal variance of butcher prices for a 30 kg pig was 744 and 225 KES, respectively. Feed items most commonly chosen for least-cost feed rations were small dried fish, cooked ground maize, whole maize, millet, cassava foliage, sweet potato vines, bone meal, avocado, and mango. Smallholder farmers who can feed pigs to reach higher ADG, have lower opportunity costs of feeds and/or who effectively bargain with butchers can benefit from semi-intensive pig rearing. Farmers without access to at least some zero-cost feeds and farmers with opportunity costs of feeds exceeding 50 % of the market price will not earn positive returns from semi-intensive pig rearing.