Purpose: This community service program was designed to address the absence of a structured, activity-based cost accounting system in the goat farming enterprise operated by Pondok Pesantren Darul Iman, a decision gap that left the boarding school unable to determine an accurate cost of goods sold, set a rational selling price, or evaluate the profitability of its livestock unit as a pillar of internal food security.Research Methodology: The team applied a participatory community service design combining a situational assessment, digital pretest and posttest evaluation, interactive lectures, hands-on Activity-Based Costing (ABC) training, and a structured costtracing exercise that classified feed, labor, veterinary, transportation, and livestock-purchase expenditures into cost pools linked to goat-day and per-head cost drivers, followed by a continuity and monitoring plan.Results: Applying the ABC framework to 120 goats over a tenmonth rearing cycle produced a cost of goods sold of approximately IDR 1,933,214 per goat, dominated by livestock purchase and labor costs, and a gross margin of about 22.7%, equivalent to roughly Rp566,786 per head at a selling price of IDR 2,500,000.Conclusions: The intervention increased participants' technical and managerial capacity to calculate accurate production costs, information that supports the pesantren's pricing decisions and its broader food security and economic independence agenda. Limitations: The costing exercise relied on a single production cycle and on simplifying assumptions regarding mortality, shared facility costs, and depreciation.Contributions: The study offers a replicable ABC costing template for faith-based agribusiness units operating under resource constraints in rural community settings.