Before adding a summary formula to your report, be sure to group report data.
Summary formulas in joined reports are just like summary formulas in standard reports, except they can apply to multiple blocks or just one. When you add a summary formula to a block, you specify whether it should apply across blocks or only to that block
Add a Summary Formula Column to a Report - https://help.salesforce.com/articleView?id=building_custom_summary_formulas.htm
Add a Summary Formula to a Joined Report - https://help.salesforce.com/articleView?id=reports_joined_custom_summary_formulas.htm&type=5