<?xml version="1.0" encoding="US-ASCII" standalone="no"?>
    <!-- Field: Doc-Info; Name: Generator; Value: GoFiler Complete; Version: 6.5a -->
    <!-- Field: Doc-Info; Name: VendorURI; Value: https://www.novaworks.com -->
    <!-- Field: Doc-Info; Name: Status; Value: 0x00000000 -->
<link:linkbase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xbrli="http://www.xbrl.org/2003/instance" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#Cover" roleURI="http://sabesp.com.br/role/Cover" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#StatementsOfFinancialPosition" roleURI="http://sabesp.com.br/role/StatementsOfFinancialPosition" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#StatementsOfIncome" roleURI="http://sabesp.com.br/role/StatementsOfIncome" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#StatementsOfComprehensiveIncome" roleURI="http://sabesp.com.br/role/StatementsOfComprehensiveIncome" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#StatementOfChangesInEquity" roleURI="http://sabesp.com.br/role/StatementOfChangesInEquity" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#StatementsOfCashFlows" roleURI="http://sabesp.com.br/role/StatementsOfCashFlows" />
    <link:roleRef xlink:type="simple" xlink:href="https://xbrl.sec.gov/cyd/2024/cyd-2024.xsd#CybersecurityRiskManagementAndStrategyDisclosure" roleURI="http://xbrl.sec.gov/cyd/role/CybersecurityRiskManagementAndStrategyDisclosure" />
    <link:roleRef xlink:type="simple" xlink:href="https://xbrl.sec.gov/cyd/2024/cyd-2024.xsd#MaterialCybersecurityIncidentDisclosure" roleURI="http://xbrl.sec.gov/cyd/role/MaterialCybersecurityIncidentDisclosure" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#Operations" roleURI="http://sabesp.com.br/role/Operations" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#BasisOfPreparationAndPresentationOfFinancialStatements" roleURI="http://sabesp.com.br/role/BasisOfPreparationAndPresentationOfFinancialStatements" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#SummaryOfMaterialAccountingPolicyInformation" roleURI="http://sabesp.com.br/role/SummaryOfMaterialAccountingPolicyInformation" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ChangesInAccountingPracticesAndDisclosures" roleURI="http://sabesp.com.br/role/ChangesInAccountingPracticesAndDisclosures" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#RiskManagement" roleURI="http://sabesp.com.br/role/RiskManagement" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#SignificantAccountingEstimatesAndJudgments" roleURI="http://sabesp.com.br/role/SignificantAccountingEstimatesAndJudgments" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#CashAndCashEquivalents" roleURI="http://sabesp.com.br/role/CashAndCashEquivalents" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialInvestments" roleURI="http://sabesp.com.br/role/FinancialInvestments" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#RestrictedCash" roleURI="http://sabesp.com.br/role/RestrictedCash" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#TradeReceivables" roleURI="http://sabesp.com.br/role/TradeReceivables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#Related-partyBalancesAndTransactions" roleURI="http://sabesp.com.br/role/Related-partyBalancesAndTransactions" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#Investments" roleURI="http://sabesp.com.br/role/Investments" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ContractAssetsAndOtherConcessionAssets" roleURI="http://sabesp.com.br/role/ContractAssetsAndOtherConcessionAssets" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#IntangibleAssets" roleURI="http://sabesp.com.br/role/IntangibleAssets" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialAssetOfConcession" roleURI="http://sabesp.com.br/role/FinancialAssetOfConcession" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PropertyPlantAndEquipment" roleURI="http://sabesp.com.br/role/PropertyPlantAndEquipment" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#BorrowingsAndFinancing" roleURI="http://sabesp.com.br/role/BorrowingsAndFinancing" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialInstruments" roleURI="http://sabesp.com.br/role/FinancialInstruments" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DerivativeFinancialInstrumentsAndHedgingTransactions" roleURI="http://sabesp.com.br/role/DerivativeFinancialInstrumentsAndHedgingTransactions" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#TaxesAndContributions" roleURI="http://sabesp.com.br/role/TaxesAndContributions" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DeferredPiscofinsTaxes" roleURI="http://sabesp.com.br/role/DeferredPiscofinsTaxes" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DeferredTaxesAndContributions" roleURI="http://sabesp.com.br/role/DeferredTaxesAndContributions" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#Provisions" roleURI="http://sabesp.com.br/role/Provisions" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#LaborAndSocialObligations" roleURI="http://sabesp.com.br/role/LaborAndSocialObligations" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PensionPlanObligations" roleURI="http://sabesp.com.br/role/PensionPlanObligations" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ServicesPayable" roleURI="http://sabesp.com.br/role/ServicesPayable" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#Equity" roleURI="http://sabesp.com.br/role/Equity" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#EarningsPerShare" roleURI="http://sabesp.com.br/role/EarningsPerShare" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#OperatingSegmentInformation" roleURI="http://sabesp.com.br/role/OperatingSegmentInformation" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#OperatingRevenue" roleURI="http://sabesp.com.br/role/OperatingRevenue" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#OperatingCostsAndExpenses" roleURI="http://sabesp.com.br/role/OperatingCostsAndExpenses" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialIncomeexpenseNet" roleURI="http://sabesp.com.br/role/FinancialIncomeexpenseNet" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#OtherOperatingIncomeExpensesNet" roleURI="http://sabesp.com.br/role/OtherOperatingIncomeExpensesNet" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#Commitments" roleURI="http://sabesp.com.br/role/Commitments" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#SupplementalCashFlowInformation" roleURI="http://sabesp.com.br/role/SupplementalCashFlowInformation" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#EventsAfterReportingPeriod" roleURI="http://sabesp.com.br/role/EventsAfterReportingPeriod" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#SummaryOfMaterialAccountingPolicyInformationPolicies" roleURI="http://sabesp.com.br/role/SummaryOfMaterialAccountingPolicyInformationPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#CashAndCashEquivalentsPolicies" roleURI="http://sabesp.com.br/role/CashAndCashEquivalentsPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialInvestmentsPolicies" roleURI="http://sabesp.com.br/role/FinancialInvestmentsPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#TradeReceivablesPolicies" roleURI="http://sabesp.com.br/role/TradeReceivablesPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#InvestmentsPolicies" roleURI="http://sabesp.com.br/role/InvestmentsPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ContractAssetsAndOtherConcessionAssetsPolicies" roleURI="http://sabesp.com.br/role/ContractAssetsAndOtherConcessionAssetsPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#IntangibleAssetsPolicies" roleURI="http://sabesp.com.br/role/IntangibleAssetsPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialAssetOfConcessionPolicies" roleURI="http://sabesp.com.br/role/FinancialAssetOfConcessionPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PropertyPlantAndEquipmentPolicies" roleURI="http://sabesp.com.br/role/PropertyPlantAndEquipmentPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#BorrowingsAndFinancingPolicies" roleURI="http://sabesp.com.br/role/BorrowingsAndFinancingPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialInstrumentsPolicies" roleURI="http://sabesp.com.br/role/FinancialInstrumentsPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DerivativeFinancialInstrumentsAndHedgingTransactionsPolicies" roleURI="http://sabesp.com.br/role/DerivativeFinancialInstrumentsAndHedgingTransactionsPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DeferredTaxesAndContributionsPolicies" roleURI="http://sabesp.com.br/role/DeferredTaxesAndContributionsPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ProvisionsPolicies" roleURI="http://sabesp.com.br/role/ProvisionsPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#LaborAndSocialObligationsPolicies" roleURI="http://sabesp.com.br/role/LaborAndSocialObligationsPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PensionPlanObligationsPolicies" roleURI="http://sabesp.com.br/role/PensionPlanObligationsPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#EquityPolicies" roleURI="http://sabesp.com.br/role/EquityPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#OperatingSegmentInformationPolicies" roleURI="http://sabesp.com.br/role/OperatingSegmentInformationPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#OperatingRevenuePolicies" roleURI="http://sabesp.com.br/role/OperatingRevenuePolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialIncomeexpenseNetPolicies" roleURI="http://sabesp.com.br/role/FinancialIncomeexpenseNetPolicies" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ChangesInAccountingPracticesAndDisclosuresTables" roleURI="http://sabesp.com.br/role/ChangesInAccountingPracticesAndDisclosuresTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#RiskManagementTables" roleURI="http://sabesp.com.br/role/RiskManagementTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#CashAndCashEquivalentsTables" roleURI="http://sabesp.com.br/role/CashAndCashEquivalentsTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialInvestmentsTables" roleURI="http://sabesp.com.br/role/FinancialInvestmentsTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#TradeReceivablesTables" roleURI="http://sabesp.com.br/role/TradeReceivablesTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#Related-partyBalancesAndTransactionsTables" roleURI="http://sabesp.com.br/role/Related-partyBalancesAndTransactionsTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#InvestmentsTables" roleURI="http://sabesp.com.br/role/InvestmentsTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ContractAssetsAndOtherConcessionAssetsTables" roleURI="http://sabesp.com.br/role/ContractAssetsAndOtherConcessionAssetsTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#IntangibleAssetsTables" roleURI="http://sabesp.com.br/role/IntangibleAssetsTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialAssetOfConcessionTables" roleURI="http://sabesp.com.br/role/FinancialAssetOfConcessionTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PropertyPlantAndEquipmentTables" roleURI="http://sabesp.com.br/role/PropertyPlantAndEquipmentTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#BorrowingsAndFinancingTables" roleURI="http://sabesp.com.br/role/BorrowingsAndFinancingTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialInstrumentsTables" roleURI="http://sabesp.com.br/role/FinancialInstrumentsTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DerivativeFinancialInstrumentsAndHedgingTransactionsTables" roleURI="http://sabesp.com.br/role/DerivativeFinancialInstrumentsAndHedgingTransactionsTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#TaxesAndContributionsTables" roleURI="http://sabesp.com.br/role/TaxesAndContributionsTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DeferredPiscofinsTaxesTables" roleURI="http://sabesp.com.br/role/DeferredPiscofinsTaxesTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DeferredTaxesAndContributionsTables" roleURI="http://sabesp.com.br/role/DeferredTaxesAndContributionsTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ProvisionsTables" roleURI="http://sabesp.com.br/role/ProvisionsTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#LaborAndSocialObligationsTables" roleURI="http://sabesp.com.br/role/LaborAndSocialObligationsTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PensionPlanObligationsTables" roleURI="http://sabesp.com.br/role/PensionPlanObligationsTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ServicesPayableTables" roleURI="http://sabesp.com.br/role/ServicesPayableTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#EquityTables" roleURI="http://sabesp.com.br/role/EquityTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#EarningsPerShareTables" roleURI="http://sabesp.com.br/role/EarningsPerShareTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#OperatingSegmentInformationTables" roleURI="http://sabesp.com.br/role/OperatingSegmentInformationTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#OperatingRevenueTables" roleURI="http://sabesp.com.br/role/OperatingRevenueTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#OperatingCostsAndExpensesTables" roleURI="http://sabesp.com.br/role/OperatingCostsAndExpensesTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialIncomeexpenseNetTables" roleURI="http://sabesp.com.br/role/FinancialIncomeexpenseNetTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#OtherOperatingIncomeExpensesNetTables" roleURI="http://sabesp.com.br/role/OtherOperatingIncomeExpensesNetTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#CommitmentsTables" roleURI="http://sabesp.com.br/role/CommitmentsTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#SupplementalCashFlowInformationTables" roleURI="http://sabesp.com.br/role/SupplementalCashFlowInformationTables" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ChangesInAccountingPracticesAndDisclosuresDetails" roleURI="http://sabesp.com.br/role/ChangesInAccountingPracticesAndDisclosuresDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#RiskManagementDetails" roleURI="http://sabesp.com.br/role/RiskManagementDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#RiskManagementDetails1" roleURI="http://sabesp.com.br/role/RiskManagementDetails1" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#RiskManagementDetails2" roleURI="http://sabesp.com.br/role/RiskManagementDetails2" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#RiskManagementDetails3" roleURI="http://sabesp.com.br/role/RiskManagementDetails3" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#RiskManagementDetails4" roleURI="http://sabesp.com.br/role/RiskManagementDetails4" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#RiskManagementDetails5" roleURI="http://sabesp.com.br/role/RiskManagementDetails5" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#RiskManagementDetailsNarrative" roleURI="http://sabesp.com.br/role/RiskManagementDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#CashAndCashEquivalentsDetails" roleURI="http://sabesp.com.br/role/CashAndCashEquivalentsDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#CashAndCashEquivalentsDetailsNarrative" roleURI="http://sabesp.com.br/role/CashAndCashEquivalentsDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialInvestmentsDetails" roleURI="http://sabesp.com.br/role/FinancialInvestmentsDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialInvestmentsDetailsNarrative" roleURI="http://sabesp.com.br/role/FinancialInvestmentsDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#RestrictedCashDetailsNarrative" roleURI="http://sabesp.com.br/role/RestrictedCashDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#TradeReceivablesDetails" roleURI="http://sabesp.com.br/role/TradeReceivablesDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#TradeReceivablesDetails1" roleURI="http://sabesp.com.br/role/TradeReceivablesDetails1" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#TradeReceivablesDetails2" roleURI="http://sabesp.com.br/role/TradeReceivablesDetails2" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#TradeReceivablesDetails3" roleURI="http://sabesp.com.br/role/TradeReceivablesDetails3" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#TradeReceivablesDetails4" roleURI="http://sabesp.com.br/role/TradeReceivablesDetails4" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#TradeReceivablesDetailsNarrative" roleURI="http://sabesp.com.br/role/TradeReceivablesDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#Related-partyBalancesAndTransactionsDetails" roleURI="http://sabesp.com.br/role/Related-partyBalancesAndTransactionsDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#Related-partyBalancesAndTransactionsDetails1" roleURI="http://sabesp.com.br/role/Related-partyBalancesAndTransactionsDetails1" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#Related-partyBalancesAndTransactionsDetails2" roleURI="http://sabesp.com.br/role/Related-partyBalancesAndTransactionsDetails2" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#Related-partyBalancesAndTransactionsDetailsNarrative" roleURI="http://sabesp.com.br/role/Related-partyBalancesAndTransactionsDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#InvestmentsDetails" roleURI="http://sabesp.com.br/role/InvestmentsDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#InvestmentsDetailsNarrative" roleURI="http://sabesp.com.br/role/InvestmentsDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ContractAssetsAndOtherConcessionAssetsDetails" roleURI="http://sabesp.com.br/role/ContractAssetsAndOtherConcessionAssetsDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ContractAssetsAndOtherConcessionAssetsDetails1" roleURI="http://sabesp.com.br/role/ContractAssetsAndOtherConcessionAssetsDetails1" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ContractAssetsAndOtherConcessionAssetsDetailsNarrative" roleURI="http://sabesp.com.br/role/ContractAssetsAndOtherConcessionAssetsDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#IntangibleAssetsDetails" roleURI="http://sabesp.com.br/role/IntangibleAssetsDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#IntangibleAssetsDetails1" roleURI="http://sabesp.com.br/role/IntangibleAssetsDetails1" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#IntangibleAssetsDetails2" roleURI="http://sabesp.com.br/role/IntangibleAssetsDetails2" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#IntangibleAssetsDetails3" roleURI="http://sabesp.com.br/role/IntangibleAssetsDetails3" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#IntangibleAssetsDetails4" roleURI="http://sabesp.com.br/role/IntangibleAssetsDetails4" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#IntangibleAssetsDetails5" roleURI="http://sabesp.com.br/role/IntangibleAssetsDetails5" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#IntangibleAssetsDetails6" roleURI="http://sabesp.com.br/role/IntangibleAssetsDetails6" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#IntangibleAssetsDetails7" roleURI="http://sabesp.com.br/role/IntangibleAssetsDetails7" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#IntangibleAssetsDetails8" roleURI="http://sabesp.com.br/role/IntangibleAssetsDetails8" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#IntangibleAssetsDetailsNarrative" roleURI="http://sabesp.com.br/role/IntangibleAssetsDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialAssetOfConcessionDetails" roleURI="http://sabesp.com.br/role/FinancialAssetOfConcessionDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialAssetOfConcessionDetailsNarrative" roleURI="http://sabesp.com.br/role/FinancialAssetOfConcessionDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialAssetIndemnityDetailsNarrative" roleURI="http://sabesp.com.br/role/FinancialAssetIndemnityDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PropertyPlantAndEquipmentDetails" roleURI="http://sabesp.com.br/role/PropertyPlantAndEquipmentDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PropertyPlantAndEquipmentDetails1" roleURI="http://sabesp.com.br/role/PropertyPlantAndEquipmentDetails1" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#BorrowingsAndFinancingDetails" roleURI="http://sabesp.com.br/role/BorrowingsAndFinancingDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#BorrowingsAndFinancingDetails1" roleURI="http://sabesp.com.br/role/BorrowingsAndFinancingDetails1" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#BorrowingsAndFinancingDetails2" roleURI="http://sabesp.com.br/role/BorrowingsAndFinancingDetails2" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#BorrowingsAndFinancingDetails3" roleURI="http://sabesp.com.br/role/BorrowingsAndFinancingDetails3" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#BorrowingsAndFinancingDetails4" roleURI="http://sabesp.com.br/role/BorrowingsAndFinancingDetails4" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#BorrowingsAndFinancingDetails5" roleURI="http://sabesp.com.br/role/BorrowingsAndFinancingDetails5" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#BorrowingsAndFinancingDetails6" roleURI="http://sabesp.com.br/role/BorrowingsAndFinancingDetails6" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#BorrowingsAndFinancingDetails7" roleURI="http://sabesp.com.br/role/BorrowingsAndFinancingDetails7" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#BorrowingsAndFinancingDetails8" roleURI="http://sabesp.com.br/role/BorrowingsAndFinancingDetails8" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#BorrowingsAndFinancingDetails9" roleURI="http://sabesp.com.br/role/BorrowingsAndFinancingDetails9" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#BorrowingsAndFinancingDetails10" roleURI="http://sabesp.com.br/role/BorrowingsAndFinancingDetails10" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#BorrowingsAndFinancingDetailsNarrative" roleURI="http://sabesp.com.br/role/BorrowingsAndFinancingDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialInstrumentsDetails" roleURI="http://sabesp.com.br/role/FinancialInstrumentsDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialInstrumentsDetailsNarrative" roleURI="http://sabesp.com.br/role/FinancialInstrumentsDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DerivativeFinancialInstrumentsAndHedgingTransactionsDetails" roleURI="http://sabesp.com.br/role/DerivativeFinancialInstrumentsAndHedgingTransactionsDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DerivativeFinancialInstrumentsAndHedgingTransactionsDetails1" roleURI="http://sabesp.com.br/role/DerivativeFinancialInstrumentsAndHedgingTransactionsDetails1" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DerivativeFinancialInstrumentsAndHedgingTransactionsDetails2" roleURI="http://sabesp.com.br/role/DerivativeFinancialInstrumentsAndHedgingTransactionsDetails2" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DerivativeFinancialInstrumentsAndHedgingTransactionsDetailsNarrative" roleURI="http://sabesp.com.br/role/DerivativeFinancialInstrumentsAndHedgingTransactionsDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#TaxesAndContributionsDetails" roleURI="http://sabesp.com.br/role/TaxesAndContributionsDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#TaxesAndContributionsDetails1" roleURI="http://sabesp.com.br/role/TaxesAndContributionsDetails1" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DeferredPiscofinsTaxesDetails" roleURI="http://sabesp.com.br/role/DeferredPiscofinsTaxesDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DeferredTaxesAndContributionsDetails" roleURI="http://sabesp.com.br/role/DeferredTaxesAndContributionsDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DeferredTaxesAndContributionsDetails1" roleURI="http://sabesp.com.br/role/DeferredTaxesAndContributionsDetails1" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DeferredTaxesAndContributionsDetails2" roleURI="http://sabesp.com.br/role/DeferredTaxesAndContributionsDetails2" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DeferredTaxesAndContributionsDetails3" roleURI="http://sabesp.com.br/role/DeferredTaxesAndContributionsDetails3" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#DeferredTaxesAndContributionsDetailsNarrative" roleURI="http://sabesp.com.br/role/DeferredTaxesAndContributionsDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ProvisionsDetails" roleURI="http://sabesp.com.br/role/ProvisionsDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ProvisionsDetails1" roleURI="http://sabesp.com.br/role/ProvisionsDetails1" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ProvisionsDetails2" roleURI="http://sabesp.com.br/role/ProvisionsDetails2" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ProvisionsDetailsNarrative" roleURI="http://sabesp.com.br/role/ProvisionsDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#LaborAndSocialObligationsDetails" roleURI="http://sabesp.com.br/role/LaborAndSocialObligationsDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#LaborAndSocialObligationsDetailsNarrative" roleURI="http://sabesp.com.br/role/LaborAndSocialObligationsDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PensionPlanObligationsDetails" roleURI="http://sabesp.com.br/role/PensionPlanObligationsDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PensionPlanObligationsDetails1" roleURI="http://sabesp.com.br/role/PensionPlanObligationsDetails1" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PensionPlanObligationsDetails2" roleURI="http://sabesp.com.br/role/PensionPlanObligationsDetails2" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PensionPlanObligationsDetails3" roleURI="http://sabesp.com.br/role/PensionPlanObligationsDetails3" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PensionPlanObligationsDetails4" roleURI="http://sabesp.com.br/role/PensionPlanObligationsDetails4" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PensionPlanObligationsDetails5" roleURI="http://sabesp.com.br/role/PensionPlanObligationsDetails5" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PensionPlanObligationsDetails6" roleURI="http://sabesp.com.br/role/PensionPlanObligationsDetails6" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PensionPlanObligationsDetails7" roleURI="http://sabesp.com.br/role/PensionPlanObligationsDetails7" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PensionPlanObligationsDetails8" roleURI="http://sabesp.com.br/role/PensionPlanObligationsDetails8" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PensionPlanObligationsDetails10" roleURI="http://sabesp.com.br/role/PensionPlanObligationsDetails10" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#PensionPlanObligationsDetailsNarrative" roleURI="http://sabesp.com.br/role/PensionPlanObligationsDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ServicesPayableDetails" roleURI="http://sabesp.com.br/role/ServicesPayableDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#ServicesPayableDetailsNarrative" roleURI="http://sabesp.com.br/role/ServicesPayableDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#EquityDetails" roleURI="http://sabesp.com.br/role/EquityDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#EquityDetails1" roleURI="http://sabesp.com.br/role/EquityDetails1" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#EquityDetails2" roleURI="http://sabesp.com.br/role/EquityDetails2" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#EquityDetails3" roleURI="http://sabesp.com.br/role/EquityDetails3" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#EquityDetails4" roleURI="http://sabesp.com.br/role/EquityDetails4" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#EquityDetailsNarrative" roleURI="http://sabesp.com.br/role/EquityDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#EarningsPerShareDetails" roleURI="http://sabesp.com.br/role/EarningsPerShareDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#OperatingSegmentInformationDetails" roleURI="http://sabesp.com.br/role/OperatingSegmentInformationDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#OperatingRevenueDetails" roleURI="http://sabesp.com.br/role/OperatingRevenueDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#OperatingRevenueDetailsNarrative" roleURI="http://sabesp.com.br/role/OperatingRevenueDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#OperatingCostsAndExpensesDetails" roleURI="http://sabesp.com.br/role/OperatingCostsAndExpensesDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#FinancialIncomeNetDetails" roleURI="http://sabesp.com.br/role/FinancialIncomeNetDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#OtherOperatingIncomeExpensesNetDetails" roleURI="http://sabesp.com.br/role/OtherOperatingIncomeExpensesNetDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#OtherOperatingIncomeExpensesNetDetailsNarrative" roleURI="http://sabesp.com.br/role/OtherOperatingIncomeExpensesNetDetailsNarrative" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#CommitmentsDetails" roleURI="http://sabesp.com.br/role/CommitmentsDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#SupplementalCashFlowInformationDetails" roleURI="http://sabesp.com.br/role/SupplementalCashFlowInformationDetails" />
    <link:roleRef xlink:type="simple" xlink:href="sbs-20251231.xsd#EventsAfterReportingPeriodDetailsNarrative" roleURI="http://sabesp.com.br/role/EventsAfterReportingPeriodDetailsNarrative" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/Cover" xlink:title="00000001 - Document - Cover" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/StatementsOfFinancialPosition" xlink:title="00000002 - Statement - Consolidated Statements of Financial Position">
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CurrentAssets" xlink:label="loc_ifrs-fullCurrentAssets" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CashAndCashEquivalents" xlink:label="loc_ifrs-fullCashAndCashEquivalents" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentAssets" xlink:to="loc_ifrs-fullCashAndCashEquivalents" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CurrentFinancialAssetsAtAmortisedCost" xlink:label="loc_ifrs-fullCurrentFinancialAssetsAtAmortisedCost" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentAssets" xlink:to="loc_ifrs-fullCurrentFinancialAssetsAtAmortisedCost" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CurrentTradeReceivables" xlink:label="loc_ifrs-fullCurrentTradeReceivables" />
      <link:calculationArc order="3" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentAssets" xlink:to="loc_ifrs-fullCurrentTradeReceivables" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_AmountsReceivableRelatedPartyTransactions" xlink:label="loc_ifrs-fullAmountsReceivableRelatedPartyTransactions" />
      <link:calculationArc order="4" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentAssets" xlink:to="loc_ifrs-fullAmountsReceivableRelatedPartyTransactions" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_Inventories" xlink:label="loc_ifrs-fullInventories" />
      <link:calculationArc order="5" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentAssets" xlink:to="loc_ifrs-fullInventories" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_RestrictedCashAndCashEquivalents" xlink:label="loc_ifrs-fullRestrictedCashAndCashEquivalents" />
      <link:calculationArc order="6" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentAssets" xlink:to="loc_ifrs-fullRestrictedCashAndCashEquivalents" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CurrentTaxAssets" xlink:label="loc_ifrs-fullCurrentTaxAssets" />
      <link:calculationArc order="7" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentAssets" xlink:to="loc_ifrs-fullCurrentTaxAssets" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_DerivativeFinancialAssets" xlink:label="loc_ifrs-fullDerivativeFinancialAssets" />
      <link:calculationArc order="8" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentAssets" xlink:to="loc_ifrs-fullDerivativeFinancialAssets" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_AssetsHeldForSale" xlink:label="loc_sbsAssetsHeldForSale" />
      <link:calculationArc order="9" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentAssets" xlink:to="loc_sbsAssetsHeldForSale" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_OtherCurrentAssets" xlink:label="loc_ifrs-fullOtherCurrentAssets" />
      <link:calculationArc order="10" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentAssets" xlink:to="loc_ifrs-fullOtherCurrentAssets" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_NoncurrentAssets" xlink:label="loc_ifrs-fullNoncurrentAssets" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_NoncurrentFinancialAssetsAtAmortisedCost" xlink:label="loc_ifrs-fullNoncurrentFinancialAssetsAtAmortisedCost" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentAssets" xlink:to="loc_ifrs-fullNoncurrentFinancialAssetsAtAmortisedCost" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_NoncurrentTradeReceivables" xlink:label="loc_ifrs-fullNoncurrentTradeReceivables" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentAssets" xlink:to="loc_ifrs-fullNoncurrentTradeReceivables" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_AccountsReceivableFromRelatedPartiesNonCurrent" xlink:label="loc_sbsAccountsReceivableFromRelatedPartiesNonCurrent" />
      <link:calculationArc order="3" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentAssets" xlink:to="loc_sbsAccountsReceivableFromRelatedPartiesNonCurrent" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_LongtermDeposits" xlink:label="loc_ifrs-fullLongtermDeposits" />
      <link:calculationArc order="4" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentAssets" xlink:to="loc_ifrs-fullLongtermDeposits" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_WaterNationalAgencyNoncurrent" xlink:label="loc_sbsWaterNationalAgencyNoncurrent" />
      <link:calculationArc order="5" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentAssets" xlink:to="loc_sbsWaterNationalAgencyNoncurrent" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_OtherNoncurrentAssets" xlink:label="loc_ifrs-fullOtherNoncurrentAssets" />
      <link:calculationArc order="6" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentAssets" xlink:to="loc_ifrs-fullOtherNoncurrentAssets" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_InvestmentAccountedForUsingEquityMethod" xlink:label="loc_ifrs-fullInvestmentAccountedForUsingEquityMethod" />
      <link:calculationArc order="7" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentAssets" xlink:to="loc_ifrs-fullInvestmentAccountedForUsingEquityMethod" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_InvestmentProperty" xlink:label="loc_ifrs-fullInvestmentProperty" />
      <link:calculationArc order="8" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentAssets" xlink:to="loc_ifrs-fullInvestmentProperty" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_NoncurrentContractAssets" xlink:label="loc_ifrs-fullNoncurrentContractAssets" />
      <link:calculationArc order="9" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentAssets" xlink:to="loc_ifrs-fullNoncurrentContractAssets" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_FinancialAssets" xlink:label="loc_ifrs-fullFinancialAssets" />
      <link:calculationArc order="10" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentAssets" xlink:to="loc_ifrs-fullFinancialAssets" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_OtherIntangibleAssets" xlink:label="loc_ifrs-fullOtherIntangibleAssets" />
      <link:calculationArc order="11" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentAssets" xlink:to="loc_ifrs-fullOtherIntangibleAssets" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_PropertyPlantAndEquipment" xlink:label="loc_ifrs-fullPropertyPlantAndEquipment" />
      <link:calculationArc order="12" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentAssets" xlink:to="loc_ifrs-fullPropertyPlantAndEquipment" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_Assets" xlink:label="loc_ifrs-fullAssets" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAssets" xlink:to="loc_ifrs-fullCurrentAssets" xlink:type="arc" weight="1" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAssets" xlink:to="loc_ifrs-fullNoncurrentAssets" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CurrentLiabilities" xlink:label="loc_ifrs-fullCurrentLiabilities" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_TradeAndOtherPayablesToTradeSuppliers" xlink:label="loc_ifrs-fullTradeAndOtherPayablesToTradeSuppliers" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentLiabilities" xlink:to="loc_ifrs-fullTradeAndOtherPayablesToTradeSuppliers" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_OtherShorttermProvisions" xlink:label="loc_ifrs-fullOtherShorttermProvisions" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentLiabilities" xlink:to="loc_ifrs-fullOtherShorttermProvisions" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CurrentPortionOfLongtermBorrowings" xlink:label="loc_ifrs-fullCurrentPortionOfLongtermBorrowings" />
      <link:calculationArc order="3" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentLiabilities" xlink:to="loc_ifrs-fullCurrentPortionOfLongtermBorrowings" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CurrentProvisionsForEmployeeBenefits" xlink:label="loc_ifrs-fullCurrentProvisionsForEmployeeBenefits" />
      <link:calculationArc order="4" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentLiabilities" xlink:to="loc_ifrs-fullCurrentProvisionsForEmployeeBenefits" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CurrentTaxLiabilities" xlink:label="loc_ifrs-fullCurrentTaxLiabilities" />
      <link:calculationArc order="5" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentLiabilities" xlink:to="loc_ifrs-fullCurrentTaxLiabilities" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_DeferredPiscofinsTaxes" xlink:label="loc_sbsDeferredPiscofinsTaxes" />
      <link:calculationArc order="6" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentLiabilities" xlink:to="loc_sbsDeferredPiscofinsTaxes" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CurrentInterestPayable" xlink:label="loc_ifrs-fullCurrentInterestPayable" />
      <link:calculationArc order="7" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentLiabilities" xlink:to="loc_ifrs-fullCurrentInterestPayable" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CurrentProvisions" xlink:label="loc_ifrs-fullCurrentProvisions" />
      <link:calculationArc order="8" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentLiabilities" xlink:to="loc_ifrs-fullCurrentProvisions" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_PublicPrivatePartnershipCurrent" xlink:label="loc_sbsPublicPrivatePartnershipCurrent" />
      <link:calculationArc order="9" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentLiabilities" xlink:to="loc_sbsPublicPrivatePartnershipCurrent" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_DerivativeFinancialLiabilities" xlink:label="loc_ifrs-fullDerivativeFinancialLiabilities" />
      <link:calculationArc order="10" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentLiabilities" xlink:to="loc_ifrs-fullDerivativeFinancialLiabilities" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_PerformanceAgreementsCurrent" xlink:label="loc_sbsPerformanceAgreementsCurrent" />
      <link:calculationArc order="11" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentLiabilities" xlink:to="loc_sbsPerformanceAgreementsCurrent" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_OtherCurrentLiabilities" xlink:label="loc_ifrs-fullOtherCurrentLiabilities" />
      <link:calculationArc order="12" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCurrentLiabilities" xlink:to="loc_ifrs-fullOtherCurrentLiabilities" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_NoncurrentLiabilities" xlink:label="loc_ifrs-fullNoncurrentLiabilities" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_LongtermBorrowings" xlink:label="loc_ifrs-fullLongtermBorrowings" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentLiabilities" xlink:to="loc_ifrs-fullLongtermBorrowings" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_DeferredIncomeTaxAndSocialContributionNoncurrent" xlink:label="loc_sbsDeferredIncomeTaxAndSocialContributionNoncurrent" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentLiabilities" xlink:to="loc_sbsDeferredIncomeTaxAndSocialContributionNoncurrent" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_DeferredCOFINSAndPASEP" xlink:label="loc_sbsDeferredCOFINSAndPASEP" />
      <link:calculationArc order="3" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentLiabilities" xlink:to="loc_sbsDeferredCOFINSAndPASEP" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_NoncurrentProvisions" xlink:label="loc_ifrs-fullNoncurrentProvisions" />
      <link:calculationArc order="4" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentLiabilities" xlink:to="loc_ifrs-fullNoncurrentProvisions" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_PensionObligations" xlink:label="loc_sbsPensionObligations" />
      <link:calculationArc order="5" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentLiabilities" xlink:to="loc_sbsPensionObligations" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_PublicprivatePartnershipPpp" xlink:label="loc_sbsPublicprivatePartnershipPpp" />
      <link:calculationArc order="6" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentLiabilities" xlink:to="loc_sbsPublicprivatePartnershipPpp" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_PerformanceAgreementsNonCurrent" xlink:label="loc_sbsPerformanceAgreementsNonCurrent" />
      <link:calculationArc order="7" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentLiabilities" xlink:to="loc_sbsPerformanceAgreementsNonCurrent" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_OtherNoncurrentLiabilities" xlink:label="loc_ifrs-fullOtherNoncurrentLiabilities" />
      <link:calculationArc order="8" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullNoncurrentLiabilities" xlink:to="loc_ifrs-fullOtherNoncurrentLiabilities" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_Liabilities" xlink:label="loc_ifrs-fullLiabilities" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullLiabilities" xlink:to="loc_ifrs-fullCurrentLiabilities" xlink:type="arc" weight="1" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullLiabilities" xlink:to="loc_ifrs-fullNoncurrentLiabilities" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_Equity" xlink:label="loc_ifrs-fullEquity" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_IssuedCapital" xlink:label="loc_ifrs-fullIssuedCapital" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullEquity" xlink:to="loc_ifrs-fullIssuedCapital" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CapitalReserve" xlink:label="loc_ifrs-fullCapitalReserve" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullEquity" xlink:to="loc_ifrs-fullCapitalReserve" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_OtherReserves" xlink:label="loc_ifrs-fullOtherReserves" />
      <link:calculationArc order="3" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullEquity" xlink:to="loc_ifrs-fullOtherReserves" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_TreasuryShares" xlink:label="loc_ifrs-fullTreasuryShares" />
      <link:calculationArc order="4" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullEquity" xlink:to="loc_ifrs-fullTreasuryShares" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_EquityValuationAdjustments" xlink:label="loc_sbsEquityValuationAdjustments" />
      <link:calculationArc order="5" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullEquity" xlink:to="loc_sbsEquityValuationAdjustments" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_EquityAndLiabilities" xlink:label="loc_ifrs-fullEquityAndLiabilities" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullEquityAndLiabilities" xlink:to="loc_ifrs-fullLiabilities" xlink:type="arc" weight="1" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullEquityAndLiabilities" xlink:to="loc_ifrs-fullEquity" xlink:type="arc" weight="1" />
    </link:calculationLink>
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/StatementsOfIncome" xlink:title="00000003 - Statement - Consolidated Statements of Income">
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_GrossProfit" xlink:label="loc_ifrs-fullGrossProfit" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_Revenue" xlink:label="loc_ifrs-fullRevenue" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullGrossProfit" xlink:to="loc_ifrs-fullRevenue" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CostOfSales" xlink:label="loc_ifrs-fullCostOfSales" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullGrossProfit" xlink:to="loc_ifrs-fullCostOfSales" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_ProfitFromOperationsBeforeFinanceIncomeExpensesAndIncomeTaxAndSocialContribution" xlink:label="loc_sbsProfitFromOperationsBeforeFinanceIncomeExpensesAndIncomeTaxAndSocialContribution" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_sbsProfitFromOperationsBeforeFinanceIncomeExpensesAndIncomeTaxAndSocialContribution" xlink:to="loc_ifrs-fullGrossProfit" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_SellingExpense" xlink:label="loc_ifrs-fullSellingExpense" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_sbsProfitFromOperationsBeforeFinanceIncomeExpensesAndIncomeTaxAndSocialContribution" xlink:to="loc_ifrs-fullSellingExpense" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_AdjustmentsForImpairmentLossReversalOfImpairmentLossRecognisedInProfitOrLoss" xlink:label="loc_ifrs-fullAdjustmentsForImpairmentLossReversalOfImpairmentLossRecognisedInProfitOrLoss" />
      <link:calculationArc order="3" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_sbsProfitFromOperationsBeforeFinanceIncomeExpensesAndIncomeTaxAndSocialContribution" xlink:to="loc_ifrs-fullAdjustmentsForImpairmentLossReversalOfImpairmentLossRecognisedInProfitOrLoss" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_AdministrativeExpense" xlink:label="loc_ifrs-fullAdministrativeExpense" />
      <link:calculationArc order="4" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_sbsProfitFromOperationsBeforeFinanceIncomeExpensesAndIncomeTaxAndSocialContribution" xlink:to="loc_ifrs-fullAdministrativeExpense" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_OtherOperatingIncomeExpense" xlink:label="loc_ifrs-fullOtherOperatingIncomeExpense" />
      <link:calculationArc order="5" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_sbsProfitFromOperationsBeforeFinanceIncomeExpensesAndIncomeTaxAndSocialContribution" xlink:to="loc_ifrs-fullOtherOperatingIncomeExpense" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_EquityInResultsOfInvestmentsInAffiliaties" xlink:label="loc_sbsEquityInResultsOfInvestmentsInAffiliaties" />
      <link:calculationArc order="6" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_sbsProfitFromOperationsBeforeFinanceIncomeExpensesAndIncomeTaxAndSocialContribution" xlink:to="loc_sbsEquityInResultsOfInvestmentsInAffiliaties" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_ProfitLossBeforeTax" xlink:label="loc_ifrs-fullProfitLossBeforeTax" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullProfitLossBeforeTax" xlink:to="loc_sbsProfitFromOperationsBeforeFinanceIncomeExpensesAndIncomeTaxAndSocialContribution" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_FinancialIncomeNet" xlink:label="loc_sbsFinancialIncomeNet" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullProfitLossBeforeTax" xlink:to="loc_sbsFinancialIncomeNet" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_IncomeTaxAndSocialContribution" xlink:label="loc_sbsIncomeTaxAndSocialContribution" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CurrentTaxExpenseIncome" xlink:label="loc_ifrs-fullCurrentTaxExpenseIncome" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_sbsIncomeTaxAndSocialContribution" xlink:to="loc_ifrs-fullCurrentTaxExpenseIncome" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_DeferredTaxExpenseIncomes" xlink:label="loc_sbsDeferredTaxExpenseIncomes" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_sbsIncomeTaxAndSocialContribution" xlink:to="loc_sbsDeferredTaxExpenseIncomes" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_ProfitLoss" xlink:label="loc_ifrs-fullProfitLoss" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullProfitLoss" xlink:to="loc_ifrs-fullProfitLossBeforeTax" xlink:type="arc" weight="1" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullProfitLoss" xlink:to="loc_sbsIncomeTaxAndSocialContribution" xlink:type="arc" weight="-1" />
    </link:calculationLink>
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/StatementsOfComprehensiveIncome" xlink:title="00000004 - Statement - Consolidated Statements of Comprehensive Income">
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_ComprehensiveIncome" xlink:label="loc_ifrs-fullComprehensiveIncome" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_ProfitLoss" xlink:label="loc_ifrs-fullProfitLoss" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullComprehensiveIncome" xlink:to="loc_ifrs-fullProfitLoss" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_ItemsWhichWillBeSubsequentlyReclassifiedToIncomeStatement" xlink:label="loc_sbsItemsWhichWillBeSubsequentlyReclassifiedToIncomeStatement" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullComprehensiveIncome" xlink:to="loc_sbsItemsWhichWillBeSubsequentlyReclassifiedToIncomeStatement" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_ReclassificationAdjustmentsOnCashFlowHedgesNetOfTax" xlink:label="loc_ifrs-fullReclassificationAdjustmentsOnCashFlowHedgesNetOfTax" />
      <link:calculationArc order="3" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullComprehensiveIncome" xlink:to="loc_ifrs-fullReclassificationAdjustmentsOnCashFlowHedgesNetOfTax" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_ActuarialRetainedEarningsAccumulatedLossesOnDefinedBenefitPlansNetOfTaxes" xlink:label="loc_sbsActuarialRetainedEarningsAccumulatedLossesOnDefinedBenefitPlansNetOfTaxes" />
      <link:calculationArc order="4" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullComprehensiveIncome" xlink:to="loc_sbsActuarialRetainedEarningsAccumulatedLossesOnDefinedBenefitPlansNetOfTaxes" xlink:type="arc" weight="1" />
    </link:calculationLink>
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/StatementOfChangesInEquity" xlink:title="00000005 - Statement - Consolidated Statement of Changes in Equity" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/StatementsOfCashFlows" xlink:title="00000006 - Statement - Consolidated Statements of Cash Flows">
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_AdjustmentsForReconcileProfitLoss" xlink:label="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_ProfitBeforeIncomeTaxAndSocialContribution" xlink:label="loc_sbsProfitBeforeIncomeTaxAndSocialContribution" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_sbsProfitBeforeIncomeTaxAndSocialContribution" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_AdjustmentsForDepreciationAndAmortisationExpense" xlink:label="loc_ifrs-fullAdjustmentsForDepreciationAndAmortisationExpense" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_ifrs-fullAdjustmentsForDepreciationAndAmortisationExpense" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_AdjustmentsForLossesGainsOnDisposalOfNoncurrentAssets" xlink:label="loc_ifrs-fullAdjustmentsForLossesGainsOnDisposalOfNoncurrentAssets" />
      <link:calculationArc order="3" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_ifrs-fullAdjustmentsForLossesGainsOnDisposalOfNoncurrentAssets" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_AllowanceForDoubtfulAccounts" xlink:label="loc_sbsAllowanceForDoubtfulAccounts" />
      <link:calculationArc order="4" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_sbsAllowanceForDoubtfulAccounts" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_ProvisionsAndInflationAdjustment" xlink:label="loc_sbsProvisionsAndInflationAdjustment" />
      <link:calculationArc order="5" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_sbsProvisionsAndInflationAdjustment" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_AdjustmentsForFinanceCosts" xlink:label="loc_ifrs-fullAdjustmentsForFinanceCosts" />
      <link:calculationArc order="6" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_ifrs-fullAdjustmentsForFinanceCosts" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_InflationAdjustmentAndExchangeGainsLossesOnBorrowingsAndFinancing" xlink:label="loc_sbsInflationAdjustmentAndExchangeGainsLossesOnBorrowingsAndFinancing" />
      <link:calculationArc order="7" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_sbsInflationAdjustmentAndExchangeGainsLossesOnBorrowingsAndFinancing" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_InterestAndInflationAdjustmentsNet" xlink:label="loc_sbsInterestAndInflationAdjustmentsNet" />
      <link:calculationArc order="8" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_sbsInterestAndInflationAdjustmentsNet" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_DerivativeFinancialInstruments" xlink:label="loc_sbsDerivativeFinancialInstruments" />
      <link:calculationArc order="9" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_sbsDerivativeFinancialInstruments" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_FinanceChargesFromCustomers" xlink:label="loc_sbsFinanceChargesFromCustomers" />
      <link:calculationArc order="10" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_sbsFinanceChargesFromCustomers" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_ProfitLossRecognisedOnExchangingConstructionServicesForIntangibleAsset2011" xlink:label="loc_ifrs-fullProfitLossRecognisedOnExchangingConstructionServicesForIntangibleAsset2011" />
      <link:calculationArc order="11" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_ifrs-fullProfitLossRecognisedOnExchangingConstructionServicesForIntangibleAsset2011" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_ProvisionForConsentDecreeAndKnowledgeRetentionProgram" xlink:label="loc_sbsProvisionForConsentDecreeAndKnowledgeRetentionProgram" />
      <link:calculationArc order="12" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_sbsProvisionForConsentDecreeAndKnowledgeRetentionProgram" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_IncreaseDecreaseThroughChangeInEquityOfSubsidiaries" xlink:label="loc_ifrs-fullIncreaseDecreaseThroughChangeInEquityOfSubsidiaries" />
      <link:calculationArc order="13" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_ifrs-fullIncreaseDecreaseThroughChangeInEquityOfSubsidiaries" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_InterestAndInflationAdjustmentPpp" xlink:label="loc_sbsInterestAndInflationAdjustmentPpp" />
      <link:calculationArc order="14" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_sbsInterestAndInflationAdjustmentPpp" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_TransferToSoPauloMunicipalGovernment" xlink:label="loc_sbsTransferToSoPauloMunicipalGovernment" />
      <link:calculationArc order="15" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_sbsTransferToSoPauloMunicipalGovernment" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_PostemploymentBenefitExpenseDefinedBenefitPlans" xlink:label="loc_ifrs-fullPostemploymentBenefitExpenseDefinedBenefitPlans" />
      <link:calculationArc order="16" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_ifrs-fullPostemploymentBenefitExpenseDefinedBenefitPlans" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_DeferredPiscofinsOnFinancialAssets" xlink:label="loc_sbsDeferredPiscofinsOnFinancialAssets" />
      <link:calculationArc order="17" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_sbsDeferredPiscofinsOnFinancialAssets" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_FinancialAssetAdjustment" xlink:label="loc_sbsFinancialAssetAdjustment" />
      <link:calculationArc order="18" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_sbsFinancialAssetAdjustment" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_OtherAdjustmentsToReconcileProfitLoss" xlink:label="loc_ifrs-fullOtherAdjustmentsToReconcileProfitLoss" />
      <link:calculationArc order="19" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:to="loc_ifrs-fullOtherAdjustmentsToReconcileProfitLoss" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CashFlowsFromUsedInOperations" xlink:label="loc_ifrs-fullCashFlowsFromUsedInOperations" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperations" xlink:to="loc_ifrs-fullAdjustmentsForReconcileProfitLoss" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_AdjustmentsForDecreaseIncreaseInTradeAccountReceivable" xlink:label="loc_ifrs-fullAdjustmentsForDecreaseIncreaseInTradeAccountReceivable" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperations" xlink:to="loc_ifrs-fullAdjustmentsForDecreaseIncreaseInTradeAccountReceivable" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_AdjustmentsForDecreaseIncreaseInOtherOperatingReceivables" xlink:label="loc_ifrs-fullAdjustmentsForDecreaseIncreaseInOtherOperatingReceivables" />
      <link:calculationArc order="3" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperations" xlink:to="loc_ifrs-fullAdjustmentsForDecreaseIncreaseInOtherOperatingReceivables" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_AdjustmentsForDecreaseIncreaseInInventories" xlink:label="loc_ifrs-fullAdjustmentsForDecreaseIncreaseInInventories" />
      <link:calculationArc order="4" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperations" xlink:to="loc_ifrs-fullAdjustmentsForDecreaseIncreaseInInventories" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_AdjustmentsForRecoverableTaxes" xlink:label="loc_sbsAdjustmentsForRecoverableTaxes" />
      <link:calculationArc order="5" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperations" xlink:to="loc_sbsAdjustmentsForRecoverableTaxes" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_AdjustmentsForIncreaseDecreaseInEscrowDeposits" xlink:label="loc_sbsAdjustmentsForIncreaseDecreaseInEscrowDeposits" />
      <link:calculationArc order="6" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperations" xlink:to="loc_sbsAdjustmentsForIncreaseDecreaseInEscrowDeposits" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_AdjustmentsForDecreaseIncreaseInOtherAssets" xlink:label="loc_ifrs-fullAdjustmentsForDecreaseIncreaseInOtherAssets" />
      <link:calculationArc order="7" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperations" xlink:to="loc_ifrs-fullAdjustmentsForDecreaseIncreaseInOtherAssets" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_AdjustmentsForIncreaseDecreaseInTradeAccountPayable" xlink:label="loc_ifrs-fullAdjustmentsForIncreaseDecreaseInTradeAccountPayable" />
      <link:calculationArc order="8" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperations" xlink:to="loc_ifrs-fullAdjustmentsForIncreaseDecreaseInTradeAccountPayable" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_AdjustmentsForIncreaseDecreaseInOtherOperatingPayables" xlink:label="loc_ifrs-fullAdjustmentsForIncreaseDecreaseInOtherOperatingPayables" />
      <link:calculationArc order="9" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperations" xlink:to="loc_ifrs-fullAdjustmentsForIncreaseDecreaseInOtherOperatingPayables" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_AdjustmentsForDecreaseIncreaseInLaborAndSocialObligations" xlink:label="loc_sbsAdjustmentsForDecreaseIncreaseInLaborAndSocialObligations" />
      <link:calculationArc order="10" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperations" xlink:to="loc_sbsAdjustmentsForDecreaseIncreaseInLaborAndSocialObligations" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_AdjustmentsForDecreaseIncreaseInTaxesAndContributionsPayable" xlink:label="loc_sbsAdjustmentsForDecreaseIncreaseInTaxesAndContributionsPayable" />
      <link:calculationArc order="11" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperations" xlink:to="loc_sbsAdjustmentsForDecreaseIncreaseInTaxesAndContributionsPayable" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_AdjustmentsForDecreaseIncreaseInDeferredCofinsPASEP" xlink:label="loc_sbsAdjustmentsForDecreaseIncreaseInDeferredCofinsPASEP" />
      <link:calculationArc order="12" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperations" xlink:to="loc_sbsAdjustmentsForDecreaseIncreaseInDeferredCofinsPASEP" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_AdjustmentsForProvisions" xlink:label="loc_ifrs-fullAdjustmentsForProvisions" />
      <link:calculationArc order="13" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperations" xlink:to="loc_ifrs-fullAdjustmentsForProvisions" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_AdjustmentsForPensionObligations" xlink:label="loc_sbsAdjustmentsForPensionObligations" />
      <link:calculationArc order="14" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperations" xlink:to="loc_sbsAdjustmentsForPensionObligations" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_AdjustmentsForIncreaseDecreaseInOtherLiabilities" xlink:label="loc_ifrs-fullAdjustmentsForIncreaseDecreaseInOtherLiabilities" />
      <link:calculationArc order="15" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperations" xlink:to="loc_ifrs-fullAdjustmentsForIncreaseDecreaseInOtherLiabilities" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CashFlowsFromUsedInOperatingActivities" xlink:label="loc_ifrs-fullCashFlowsFromUsedInOperatingActivities" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperatingActivities" xlink:to="loc_ifrs-fullCashFlowsFromUsedInOperations" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_InterestPaidClassifiedAsOperatingActivities" xlink:label="loc_ifrs-fullInterestPaidClassifiedAsOperatingActivities" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperatingActivities" xlink:to="loc_ifrs-fullInterestPaidClassifiedAsOperatingActivities" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_IncomeTaxesPaidRefundClassifiedAsOperatingActivities" xlink:label="loc_ifrs-fullIncomeTaxesPaidRefundClassifiedAsOperatingActivities" />
      <link:calculationArc order="3" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInOperatingActivities" xlink:to="loc_ifrs-fullIncomeTaxesPaidRefundClassifiedAsOperatingActivities" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CashFlowsFromUsedInInvestingActivities" xlink:label="loc_ifrs-fullCashFlowsFromUsedInInvestingActivities" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_PurchaseOfIntangibleAssetsClassifiedAsInvestingActivities" xlink:label="loc_ifrs-fullPurchaseOfIntangibleAssetsClassifiedAsInvestingActivities" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInInvestingActivities" xlink:to="loc_ifrs-fullPurchaseOfIntangibleAssetsClassifiedAsInvestingActivities" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CashFlowsFromUsedInDecreaseIncreaseInRestrictedCashAndCashEquivalents" xlink:label="loc_ifrs-fullCashFlowsFromUsedInDecreaseIncreaseInRestrictedCashAndCashEquivalents" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInInvestingActivities" xlink:to="loc_ifrs-fullCashFlowsFromUsedInDecreaseIncreaseInRestrictedCashAndCashEquivalents" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_FinancialInvestments" xlink:label="loc_sbsFinancialInvestments" />
      <link:calculationArc order="3" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInInvestingActivities" xlink:to="loc_sbsFinancialInvestments" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_FinancialInvesmentsRedemption" xlink:label="loc_sbsFinancialInvesmentsRedemption" />
      <link:calculationArc order="4" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInInvestingActivities" xlink:to="loc_sbsFinancialInvesmentsRedemption" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_FinancialInvesmentsInvestment" xlink:label="loc_sbsFinancialInvesmentsInvestment" />
      <link:calculationArc order="5" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInInvestingActivities" xlink:to="loc_sbsFinancialInvesmentsInvestment" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_DividendsReceived" xlink:label="loc_ifrs-fullDividendsReceived" />
      <link:calculationArc order="6" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInInvestingActivities" xlink:to="loc_ifrs-fullDividendsReceived" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_PaymentsToAcquireInterestsInSubsidiariesAndAffiliates" xlink:label="loc_sbsPaymentsToAcquireInterestsInSubsidiariesAndAffiliates" />
      <link:calculationArc order="7" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInInvestingActivities" xlink:to="loc_sbsPaymentsToAcquireInterestsInSubsidiariesAndAffiliates" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_CashFlowsFromUsedInFinancingActivities" xlink:label="loc_ifrs-fullCashFlowsFromUsedInFinancingActivities" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_BorrowingsAndFinancingAmounts" xlink:label="loc_sbsBorrowingsAndFinancingAmounts" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInFinancingActivities" xlink:to="loc_sbsBorrowingsAndFinancingAmounts" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_ProceedsFromIssuancesOfMediumTermNotes" xlink:label="loc_sbsProceedsFromIssuancesOfMediumTermNotes" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInFinancingActivities" xlink:to="loc_sbsProceedsFromIssuancesOfMediumTermNotes" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_PaymentForAmortization" xlink:label="loc_sbsPaymentForAmortization" />
      <link:calculationArc order="3" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInFinancingActivities" xlink:to="loc_sbsPaymentForAmortization" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_DividendsPaidClassifiedAsFinancingActivities" xlink:label="loc_ifrs-fullDividendsPaidClassifiedAsFinancingActivities" />
      <link:calculationArc order="4" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInFinancingActivities" xlink:to="loc_ifrs-fullDividendsPaidClassifiedAsFinancingActivities" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_PaymentsOfLeaseLiabilitiesClassifiedAsFinancingActivities" xlink:label="loc_ifrs-fullPaymentsOfLeaseLiabilitiesClassifiedAsFinancingActivities" />
      <link:calculationArc order="5" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInFinancingActivities" xlink:to="loc_ifrs-fullPaymentsOfLeaseLiabilitiesClassifiedAsFinancingActivities" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_ProgramContractCommitments" xlink:label="loc_sbsProgramContractCommitments" />
      <link:calculationArc order="6" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInFinancingActivities" xlink:to="loc_sbsProgramContractCommitments" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_ProceedsFromDerivativeFinancialInstrumentsReceived" xlink:label="loc_sbsProceedsFromDerivativeFinancialInstrumentsReceived" />
      <link:calculationArc order="7" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInFinancingActivities" xlink:to="loc_sbsProceedsFromDerivativeFinancialInstrumentsReceived" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_TreasuryShare" xlink:label="loc_sbsTreasuryShare" />
      <link:calculationArc order="8" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInFinancingActivities" xlink:to="loc_sbsTreasuryShare" xlink:type="arc" weight="-1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_CapitalIsncrease" xlink:label="loc_sbsCapitalIsncrease" />
      <link:calculationArc order="9" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullCashFlowsFromUsedInFinancingActivities" xlink:to="loc_sbsCapitalIsncrease" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="https://xbrl.ifrs.org/taxonomy/2024-03-27/full_ifrs/full_ifrs-cor_2024-03-27.xsd#ifrs-full_IncreaseDecreaseInCashAndCashEquivalents" xlink:label="loc_ifrs-fullIncreaseDecreaseInCashAndCashEquivalents" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullIncreaseDecreaseInCashAndCashEquivalents" xlink:to="loc_ifrs-fullCashFlowsFromUsedInOperatingActivities" xlink:type="arc" weight="1" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullIncreaseDecreaseInCashAndCashEquivalents" xlink:to="loc_ifrs-fullCashFlowsFromUsedInInvestingActivities" xlink:type="arc" weight="1" />
      <link:calculationArc order="3" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_ifrs-fullIncreaseDecreaseInCashAndCashEquivalents" xlink:to="loc_ifrs-fullCashFlowsFromUsedInFinancingActivities" xlink:type="arc" weight="1" />
    </link:calculationLink>
    <link:calculationLink xlink:type="extended" xlink:role="http://xbrl.sec.gov/cyd/role/CybersecurityRiskManagementAndStrategyDisclosure" xlink:title="00000012 - Disclosure - Cybersecurity Risk Management and Strategy Disclosure" />
    <link:calculationLink xlink:type="extended" xlink:role="http://xbrl.sec.gov/cyd/role/MaterialCybersecurityIncidentDisclosure" xlink:title="00000013 - Disclosure - Material Cybersecurity Incident Disclosure" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/Operations" xlink:title="999014 - Disclosure - Operations" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/BasisOfPreparationAndPresentationOfFinancialStatements" xlink:title="999015 - Disclosure - Basis of preparation and presentation of the financial statements" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/SummaryOfMaterialAccountingPolicyInformation" xlink:title="999016 - Disclosure - Summary of material accounting policy information" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ChangesInAccountingPracticesAndDisclosures" xlink:title="999017 - Disclosure - Changes in accounting practices and disclosures" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/RiskManagement" xlink:title="999018 - Disclosure - Risk management" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/SignificantAccountingEstimatesAndJudgments" xlink:title="999019 - Disclosure - Significant accounting estimates and judgments" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/CashAndCashEquivalents" xlink:title="999020 - Disclosure - Cash and cash equivalents" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialInvestments" xlink:title="999021 - Disclosure - Financial investments" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/RestrictedCash" xlink:title="999022 - Disclosure - Restricted cash" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/TradeReceivables" xlink:title="999023 - Disclosure - Trade receivables" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/Related-partyBalancesAndTransactions" xlink:title="999024 - Disclosure - Related-party balances and transactions" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/Investments" xlink:title="999025 - Disclosure - Investments" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ContractAssetsAndOtherConcessionAssets" xlink:title="999026 - Disclosure - Contract assets and other concession assets" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/IntangibleAssets" xlink:title="999027 - Disclosure - Intangible assets" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialAssetOfConcession" xlink:title="999028 - Disclosure - Financial asset of the concession" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PropertyPlantAndEquipment" xlink:title="999029 - Disclosure - Property, plant, and equipment" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/BorrowingsAndFinancing" xlink:title="999030 - Disclosure - Borrowings and financing" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialInstruments" xlink:title="999031 - Disclosure - Financial instruments" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DerivativeFinancialInstrumentsAndHedgingTransactions" xlink:title="999032 - Disclosure - Derivative financial instruments and hedging transactions" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/TaxesAndContributions" xlink:title="999033 - Disclosure - Taxes and Contributions" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DeferredPiscofinsTaxes" xlink:title="999034 - Disclosure - Deferred PIS/Cofins taxes" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DeferredTaxesAndContributions" xlink:title="999035 - Disclosure - Deferred taxes and contributions" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/Provisions" xlink:title="999036 - Disclosure - Provisions" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/LaborAndSocialObligations" xlink:title="999037 - Disclosure - Labor and social obligations" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PensionPlanObligations" xlink:title="999038 - Disclosure - Pension plan obligations" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ServicesPayable" xlink:title="999039 - Disclosure - Services payable" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/Equity" xlink:title="999040 - Disclosure - Equity" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/EarningsPerShare" xlink:title="999041 - Disclosure - Earnings per share" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/OperatingSegmentInformation" xlink:title="999042 - Disclosure - Operating segment information" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/OperatingRevenue" xlink:title="999043 - Disclosure - Operating revenue" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/OperatingCostsAndExpenses" xlink:title="999044 - Disclosure - Operating costs and expenses" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialIncomeexpenseNet" xlink:title="999045 - Disclosure - Financial income/(expense), net" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/OtherOperatingIncomeExpensesNet" xlink:title="999046 - Disclosure - Other operating income (expenses), net" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/Commitments" xlink:title="999047 - Disclosure - Commitments" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/SupplementalCashFlowInformation" xlink:title="999048 - Disclosure - Supplemental cash flow information" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/EventsAfterReportingPeriod" xlink:title="999049 - Disclosure - Events after the reporting period" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/SummaryOfMaterialAccountingPolicyInformationPolicies" xlink:title="999050 - Disclosure - Summary of material accounting policy information (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/CashAndCashEquivalentsPolicies" xlink:title="999051 - Disclosure - Cash and cash equivalents (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialInvestmentsPolicies" xlink:title="999052 - Disclosure - Financial investments (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/TradeReceivablesPolicies" xlink:title="999053 - Disclosure - Trade receivables (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/InvestmentsPolicies" xlink:title="999054 - Disclosure - Investments (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ContractAssetsAndOtherConcessionAssetsPolicies" xlink:title="999055 - Disclosure - Contract assets and other concession assets (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/IntangibleAssetsPolicies" xlink:title="999056 - Disclosure - Intangible assets (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialAssetOfConcessionPolicies" xlink:title="999057 - Disclosure - Financial asset of the concession (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PropertyPlantAndEquipmentPolicies" xlink:title="999058 - Disclosure - Property, plant, and equipment (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/BorrowingsAndFinancingPolicies" xlink:title="999059 - Disclosure - Borrowings and financing (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialInstrumentsPolicies" xlink:title="999060 - Disclosure - Financial instruments (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DerivativeFinancialInstrumentsAndHedgingTransactionsPolicies" xlink:title="999061 - Disclosure - Derivative financial instruments and hedging transactions (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DeferredTaxesAndContributionsPolicies" xlink:title="999062 - Disclosure - Deferred taxes and contributions (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ProvisionsPolicies" xlink:title="999063 - Disclosure - Provisions (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/LaborAndSocialObligationsPolicies" xlink:title="999064 - Disclosure - Labor and social obligations (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PensionPlanObligationsPolicies" xlink:title="999065 - Disclosure - Pension plan obligations (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/EquityPolicies" xlink:title="999066 - Disclosure - Equity (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/OperatingSegmentInformationPolicies" xlink:title="999067 - Disclosure - Operating segment information (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/OperatingRevenuePolicies" xlink:title="999068 - Disclosure - Operating revenue (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialIncomeexpenseNetPolicies" xlink:title="999069 - Disclosure - Financial income/(expense), net (Policies)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ChangesInAccountingPracticesAndDisclosuresTables" xlink:title="999070 - Disclosure - Changes in accounting practices and disclosures (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/RiskManagementTables" xlink:title="999071 - Disclosure - Risk management (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/CashAndCashEquivalentsTables" xlink:title="999072 - Disclosure - Cash and cash equivalents (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialInvestmentsTables" xlink:title="999073 - Disclosure - Financial investments (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/TradeReceivablesTables" xlink:title="999074 - Disclosure - Trade receivables (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/Related-partyBalancesAndTransactionsTables" xlink:title="999075 - Disclosure - Related-party balances and transactions (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/InvestmentsTables" xlink:title="999076 - Disclosure - Investments (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ContractAssetsAndOtherConcessionAssetsTables" xlink:title="999077 - Disclosure - Contract assets and other concession assets (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/IntangibleAssetsTables" xlink:title="999078 - Disclosure - Intangible assets (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialAssetOfConcessionTables" xlink:title="999079 - Disclosure - Financial asset of the concession (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PropertyPlantAndEquipmentTables" xlink:title="999080 - Disclosure - Property, plant, and equipment (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/BorrowingsAndFinancingTables" xlink:title="999081 - Disclosure - Borrowings and financing (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialInstrumentsTables" xlink:title="999082 - Disclosure - Financial instruments (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DerivativeFinancialInstrumentsAndHedgingTransactionsTables" xlink:title="999083 - Disclosure - Derivative financial instruments and hedging transactions (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/TaxesAndContributionsTables" xlink:title="999084 - Disclosure - Taxes and Contributions (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DeferredPiscofinsTaxesTables" xlink:title="999085 - Disclosure - Deferred PIS/Cofins taxes (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DeferredTaxesAndContributionsTables" xlink:title="999086 - Disclosure - Deferred taxes and contributions (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ProvisionsTables" xlink:title="999087 - Disclosure - Provisions (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/LaborAndSocialObligationsTables" xlink:title="999088 - Disclosure - Labor and social obligations (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PensionPlanObligationsTables" xlink:title="999089 - Disclosure - Pension plan obligations (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ServicesPayableTables" xlink:title="999090 - Disclosure - Services payable (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/EquityTables" xlink:title="999091 - Disclosure - Equity (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/EarningsPerShareTables" xlink:title="999092 - Disclosure - Earnings per share (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/OperatingSegmentInformationTables" xlink:title="999093 - Disclosure - Operating segment information (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/OperatingRevenueTables" xlink:title="999094 - Disclosure - Operating revenue (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/OperatingCostsAndExpensesTables" xlink:title="999095 - Disclosure - Operating costs and expenses (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialIncomeexpenseNetTables" xlink:title="999096 - Disclosure - Financial income/(expense), net (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/OtherOperatingIncomeExpensesNetTables" xlink:title="999097 - Disclosure - Other operating income (expenses), net (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/CommitmentsTables" xlink:title="999098 - Disclosure - Commitments (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/SupplementalCashFlowInformationTables" xlink:title="999099 - Disclosure - Supplemental cash flow information (Tables)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ChangesInAccountingPracticesAndDisclosuresDetails" xlink:title="999100 - Disclosure - Changes in accounting practices and disclosures (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/RiskManagementDetails" xlink:title="999101 - Disclosure - Risk Management (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/RiskManagementDetails1" xlink:title="999102 - Disclosure - Risk Management (Details 1)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/RiskManagementDetails2" xlink:title="999103 - Disclosure - Risk Management (Details 2)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/RiskManagementDetails3" xlink:title="999104 - Disclosure - Risk Management (Details 3)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/RiskManagementDetails4" xlink:title="999105 - Disclosure - Risk Management (Details 4)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/RiskManagementDetails5" xlink:title="999106 - Disclosure - Risk Management (Details 5)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/RiskManagementDetailsNarrative" xlink:title="999107 - Disclosure - Risk management (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/CashAndCashEquivalentsDetails" xlink:title="999108 - Disclosure - Cash and cash equivalents (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/CashAndCashEquivalentsDetailsNarrative" xlink:title="999109 - Disclosure - Cash and cash equivalents (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialInvestmentsDetails" xlink:title="999110 - Disclosure - Financial investments (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialInvestmentsDetailsNarrative" xlink:title="999111 - Disclosure - Financial investments (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/RestrictedCashDetailsNarrative" xlink:title="999112 - Disclosure - Restricted cash (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/TradeReceivablesDetails" xlink:title="999113 - Disclosure - Trade receivables (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/TradeReceivablesDetails1" xlink:title="999114 - Disclosure - Trade receivables (Details 1)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/TradeReceivablesDetails2" xlink:title="999115 - Disclosure - Trade receivables (Details 2)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/TradeReceivablesDetails3" xlink:title="999116 - Disclosure - Trade receivables (Details 3)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/TradeReceivablesDetails4" xlink:title="999117 - Disclosure - Trade receivables (Details 4)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/TradeReceivablesDetailsNarrative" xlink:title="999118 - Disclosure - Trade receivables (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/Related-partyBalancesAndTransactionsDetails" xlink:title="999119 - Disclosure - Related-Party Balances and Transactions (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/Related-partyBalancesAndTransactionsDetails1" xlink:title="999120 - Disclosure - Related-Party Balances and Transactions (Details 1)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/Related-partyBalancesAndTransactionsDetails2" xlink:title="999121 - Disclosure - Related-Party Balances and Transactions (Details 2)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/Related-partyBalancesAndTransactionsDetailsNarrative" xlink:title="999122 - Disclosure - Related-party balances and transactions (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/InvestmentsDetails" xlink:title="999123 - Disclosure - Investments (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/InvestmentsDetailsNarrative" xlink:title="999124 - Disclosure - Investments (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ContractAssetsAndOtherConcessionAssetsDetails" xlink:title="999125 - Disclosure - Contract assets and other concession assets (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ContractAssetsAndOtherConcessionAssetsDetails1" xlink:title="999126 - Disclosure - Contract assets and other concession assets (Details 1)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ContractAssetsAndOtherConcessionAssetsDetailsNarrative" xlink:title="999127 - Disclosure - Contract assets and other concession assets (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/IntangibleAssetsDetails" xlink:title="999128 - Disclosure - Intangible assets (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/IntangibleAssetsDetails1" xlink:title="999129 - Disclosure - Intangible assets (Details 1)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/IntangibleAssetsDetails2" xlink:title="999130 - Disclosure - Intangible assets (Details 2)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/IntangibleAssetsDetails3" xlink:title="999131 - Disclosure - Intangible assets (Details 3)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/IntangibleAssetsDetails4" xlink:title="999132 - Disclosure - Intangible assets (Details 4)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/IntangibleAssetsDetails5" xlink:title="999133 - Disclosure - Intangible assets (Details 5)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/IntangibleAssetsDetails6" xlink:title="999134 - Disclosure - Intangible assets (Details 6)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/IntangibleAssetsDetails7" xlink:title="999135 - Disclosure - Intangible assets (Details 7)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/IntangibleAssetsDetails8" xlink:title="999136 - Disclosure - Intangible assets (Details 8)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/IntangibleAssetsDetailsNarrative" xlink:title="999137 - Disclosure - Intangible assets (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialAssetOfConcessionDetails" xlink:title="999138 - Disclosure - Financial asset of the concession (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialAssetOfConcessionDetailsNarrative" xlink:title="999139 - Disclosure - Financial asset of the concession (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialAssetIndemnityDetailsNarrative" xlink:title="999140 - Disclosure - Financial Asset (Indemnity) (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PropertyPlantAndEquipmentDetails" xlink:title="999141 - Disclosure - Property, plant, and equipment (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PropertyPlantAndEquipmentDetails1" xlink:title="999142 - Disclosure - Property, plant, and equipment (Details 1)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/BorrowingsAndFinancingDetails" xlink:title="999143 - Disclosure - Borrowings and financing (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/BorrowingsAndFinancingDetails1" xlink:title="999144 - Disclosure - Borrowings and financing (Details 1)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/BorrowingsAndFinancingDetails2" xlink:title="999145 - Disclosure - Borrowings and financing (Details 2)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/BorrowingsAndFinancingDetails3" xlink:title="999146 - Disclosure - Borrowings and financing (Details 3)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/BorrowingsAndFinancingDetails4" xlink:title="999147 - Disclosure - Borrowings and financing (Details 4)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/BorrowingsAndFinancingDetails5" xlink:title="999148 - Disclosure - Borrowings and financing (Details 5)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/BorrowingsAndFinancingDetails6" xlink:title="999149 - Disclosure - Borrowings and financing (Details 6)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/BorrowingsAndFinancingDetails7" xlink:title="999150 - Disclosure - Borrowings and financing (Details 7)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/BorrowingsAndFinancingDetails8" xlink:title="999151 - Disclosure - Borrowings and financing (Details 8)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/BorrowingsAndFinancingDetails9" xlink:title="999152 - Disclosure - Borrowings and financing (Details 9)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/BorrowingsAndFinancingDetails10" xlink:title="999153 - Disclosure - Borrowings and financing (Details 10)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/BorrowingsAndFinancingDetailsNarrative" xlink:title="999154 - Disclosure - Borrowings and financing (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialInstrumentsDetails" xlink:title="999155 - Disclosure - Financial instruments (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialInstrumentsDetailsNarrative" xlink:title="999156 - Disclosure - Financial instruments (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DerivativeFinancialInstrumentsAndHedgingTransactionsDetails" xlink:title="999157 - Disclosure - Derivative financial instruments and hedging transactions (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DerivativeFinancialInstrumentsAndHedgingTransactionsDetails1" xlink:title="999158 - Disclosure - Derivative financial instruments and hedging transactions (Details 1)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DerivativeFinancialInstrumentsAndHedgingTransactionsDetails2" xlink:title="999159 - Disclosure - Derivative financial instruments and hedging transactions (Details 2)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DerivativeFinancialInstrumentsAndHedgingTransactionsDetailsNarrative" xlink:title="999160 - Disclosure - Derivative financial instruments and hedging transactions (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/TaxesAndContributionsDetails" xlink:title="999161 - Disclosure - Taxes and contributions (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/TaxesAndContributionsDetails1" xlink:title="999162 - Disclosure - Taxes and contributions (Details 1)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DeferredPiscofinsTaxesDetails" xlink:title="999163 - Disclosure - Deferred PIS/Cofins taxes (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DeferredTaxesAndContributionsDetails" xlink:title="999164 - Disclosure - Deferred taxes and contributions (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DeferredTaxesAndContributionsDetails1" xlink:title="999165 - Disclosure - Deferred taxes and contributions (Details 1)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DeferredTaxesAndContributionsDetails2" xlink:title="999166 - Disclosure - Deferred taxes and contributions (Details 2)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DeferredTaxesAndContributionsDetails3" xlink:title="999167 - Disclosure - Deferred taxes and contributions (Details 3)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/DeferredTaxesAndContributionsDetailsNarrative" xlink:title="999168 - Disclosure - Deferred taxes and contributions (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ProvisionsDetails" xlink:title="999169 - Disclosure - Provisions (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ProvisionsDetails1" xlink:title="999170 - Disclosure - Provisions (Details 1)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ProvisionsDetails2" xlink:title="999171 - Disclosure - Provisions (Details 2)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ProvisionsDetailsNarrative" xlink:title="999172 - Disclosure - Provisions (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/LaborAndSocialObligationsDetails" xlink:title="999173 - Disclosure - Labor and social obligations (Details)">
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_Total" xlink:label="loc_sbsTotal" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_SalariesAndPayrollCharges" xlink:label="loc_sbsSalariesAndPayrollCharges" />
      <link:calculationArc order="1" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_sbsTotal" xlink:to="loc_sbsSalariesAndPayrollCharges" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_ProvisionForVacation" xlink:label="loc_sbsProvisionForVacation" />
      <link:calculationArc order="2" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_sbsTotal" xlink:to="loc_sbsProvisionForVacation" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_HealthcarePlanI" xlink:label="loc_sbsHealthcarePlanI" />
      <link:calculationArc order="3" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_sbsTotal" xlink:to="loc_sbsHealthcarePlanI" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_ProvisionForProfitSharingIi" xlink:label="loc_sbsProvisionForProfitSharingIi" />
      <link:calculationArc order="4" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_sbsTotal" xlink:to="loc_sbsProvisionForProfitSharingIi" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_IncentivizedDismissalProgramPdiIii" xlink:label="loc_sbsIncentivizedDismissalProgramPdiIii" />
      <link:calculationArc order="5" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_sbsTotal" xlink:to="loc_sbsIncentivizedDismissalProgramPdiIii" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_VoluntaryDismissalProgram" xlink:label="loc_sbsVoluntaryDismissalProgram" />
      <link:calculationArc order="6" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_sbsTotal" xlink:to="loc_sbsVoluntaryDismissalProgram" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_ConsentDecreeTac" xlink:label="loc_sbsConsentDecreeTac" />
      <link:calculationArc order="7" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_sbsTotal" xlink:to="loc_sbsConsentDecreeTac" xlink:type="arc" weight="1" />
      <link:loc xlink:type="locator" xlink:href="sbs-20251231.xsd#sbs_KnowledgeRetentionProgramPrc" xlink:label="loc_sbsKnowledgeRetentionProgramPrc" />
      <link:calculationArc order="8" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_sbsTotal" xlink:to="loc_sbsKnowledgeRetentionProgramPrc" xlink:type="arc" weight="1" />
    </link:calculationLink>
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/LaborAndSocialObligationsDetailsNarrative" xlink:title="999174 - Disclosure - Labor and social obligations (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PensionPlanObligationsDetails" xlink:title="999175 - Disclosure - Pension plan obligations (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PensionPlanObligationsDetails1" xlink:title="999176 - Disclosure - Pension plan obligations (Details 1)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PensionPlanObligationsDetails2" xlink:title="999177 - Disclosure - Pension plan obligations (Details 2)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PensionPlanObligationsDetails3" xlink:title="999178 - Disclosure - Pension plan obligations (Details 3)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PensionPlanObligationsDetails4" xlink:title="999179 - Disclosure - Pension plan obligations (Details 4)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PensionPlanObligationsDetails5" xlink:title="999180 - Disclosure - Pension plan obligations (Details 5)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PensionPlanObligationsDetails6" xlink:title="999181 - Disclosure - Pension plan obligations (Details 6)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PensionPlanObligationsDetails7" xlink:title="999182 - Disclosure - Pension plan obligations (Details 7)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PensionPlanObligationsDetails8" xlink:title="999183 - Disclosure - Pension plan obligations (Details 8)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PensionPlanObligationsDetails10" xlink:title="999184 - Disclosure - Pension plan obligations (Details 10)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/PensionPlanObligationsDetailsNarrative" xlink:title="999185 - Disclosure - Pension plan obligations (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ServicesPayableDetails" xlink:title="999186 - Disclosure - Services payable (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/ServicesPayableDetailsNarrative" xlink:title="999187 - Disclosure - Services payable (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/EquityDetails" xlink:title="999188 - Disclosure - Equity (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/EquityDetails1" xlink:title="999189 - Disclosure - Equity  (Details 1)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/EquityDetails2" xlink:title="999190 - Disclosure - Equity  (Details 2)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/EquityDetails3" xlink:title="999191 - Disclosure - Equity  (Details 3)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/EquityDetails4" xlink:title="999192 - Disclosure - Equity  (Details 4)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/EquityDetailsNarrative" xlink:title="999193 - Disclosure - Equity (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/EarningsPerShareDetails" xlink:title="999194 - Disclosure - Earnings per share (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/OperatingSegmentInformationDetails" xlink:title="999195 - Disclosure - Operating segment information (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/OperatingRevenueDetails" xlink:title="999196 - Disclosure - Operating revenue (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/OperatingRevenueDetailsNarrative" xlink:title="999197 - Disclosure - Operating revenue (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/OperatingCostsAndExpensesDetails" xlink:title="999198 - Disclosure - Operating costs and expenses (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/FinancialIncomeNetDetails" xlink:title="999199 - Disclosure - Financial Income, net (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/OtherOperatingIncomeExpensesNetDetails" xlink:title="999200 - Disclosure - Other operating income (expenses), net (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/OtherOperatingIncomeExpensesNetDetailsNarrative" xlink:title="999201 - Disclosure - Other operating income (expenses), net (Details Narrative)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/CommitmentsDetails" xlink:title="999202 - Disclosure - Commitments (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/SupplementalCashFlowInformationDetails" xlink:title="999203 - Disclosure - Supplemental cash flow information (Details)" />
    <link:calculationLink xlink:type="extended" xlink:role="http://sabesp.com.br/role/EventsAfterReportingPeriodDetailsNarrative" xlink:title="999204 - Disclosure - Events after the reporting period (Details Narrative)" />
</link:linkbase>
