<?xml version="1.0" encoding="UTF-8"?>

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2024 Workiva-->
<!--r:d1b0d374-59d3-494d-ab57-0327414dd086,g:e2d69e39-7080-477b-8655-fce353fd237f-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/ConsolidatedBalanceSheets" xlink:type="simple" xlink:href="anip-20231231.xsd#ConsolidatedBalanceSheets"/>
  <link:calculationLink xlink:role="http://www.anipharmaceuticals.com/role/ConsolidatedBalanceSheets" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_dcc37ae2-188e-46e2-8d38-4cd2a40dbeb9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Assets"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_5e4c8303-ae31-4664-8a67-3c742e472e7a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_dcc37ae2-188e-46e2-8d38-4cd2a40dbeb9" xlink:to="loc_us-gaap_AssetsCurrent_5e4c8303-ae31-4664-8a67-3c742e472e7a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_63928fa8-9787-4e08-a6ca-c2a05225cc44" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_dcc37ae2-188e-46e2-8d38-4cd2a40dbeb9" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_63928fa8-9787-4e08-a6ca-c2a05225cc44" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_0265d4b7-7e8a-405a-9a9a-ea288a1d3da0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_dcc37ae2-188e-46e2-8d38-4cd2a40dbeb9" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_0265d4b7-7e8a-405a-9a9a-ea288a1d3da0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_56dc8900-4c8b-46c5-bdee-ed84895c3c53" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_dcc37ae2-188e-46e2-8d38-4cd2a40dbeb9" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_56dc8900-4c8b-46c5-bdee-ed84895c3c53" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_47401662-b8f3-4b45-b9a7-25ee95ca7e0c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Goodwill"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_dcc37ae2-188e-46e2-8d38-4cd2a40dbeb9" xlink:to="loc_us-gaap_Goodwill_47401662-b8f3-4b45-b9a7-25ee95ca7e0c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_c481518f-9763-4fc2-b24b-a00dd06c19ab" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Assets_dcc37ae2-188e-46e2-8d38-4cd2a40dbeb9" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_c481518f-9763-4fc2-b24b-a00dd06c19ab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_c423bcbb-0e34-495f-9dd5-b8c06f9059f3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Liabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_a37a0ae3-3ae2-45d9-8898-ec48b5050667" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtNoncurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_c423bcbb-0e34-495f-9dd5-b8c06f9059f3" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_a37a0ae3-3ae2-45d9-8898-ec48b5050667" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_421400f4-3b80-4078-898c-a5954106e6fe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_c423bcbb-0e34-495f-9dd5-b8c06f9059f3" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_421400f4-3b80-4078-898c-a5954106e6fe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationContingentConsiderationLiabilityNoncurrent_aee556ba-0567-485c-9af4-bb535a923d09" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationContingentConsiderationLiabilityNoncurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_c423bcbb-0e34-495f-9dd5-b8c06f9059f3" xlink:to="loc_us-gaap_BusinessCombinationContingentConsiderationLiabilityNoncurrent_aee556ba-0567-485c-9af4-bb535a923d09" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_163ef1bd-b4d4-40b2-ad71-071c96907e38" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_Liabilities_c423bcbb-0e34-495f-9dd5-b8c06f9059f3" xlink:to="loc_us-gaap_LiabilitiesCurrent_163ef1bd-b4d4-40b2-ad71-071c96907e38" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_d4f22bec-7206-406c-995e-494a87374667" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_3f5ba040-34d3-4eb2-9937-6ebce5d3d1ba" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Liabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_d4f22bec-7206-406c-995e-494a87374667" xlink:to="loc_us-gaap_Liabilities_3f5ba040-34d3-4eb2-9937-6ebce5d3d1ba" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_9777ef3f-872a-45fa-b0e6-4ac152f43c0f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_d4f22bec-7206-406c-995e-494a87374667" xlink:to="loc_us-gaap_StockholdersEquity_9777ef3f-872a-45fa-b0e6-4ac152f43c0f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TemporaryEquityCarryingAmountAttributableToParent_01ae423f-3df9-4fed-a2da-74ac8096cd48" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TemporaryEquityCarryingAmountAttributableToParent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquity_d4f22bec-7206-406c-995e-494a87374667" xlink:to="loc_us-gaap_TemporaryEquityCarryingAmountAttributableToParent_01ae423f-3df9-4fed-a2da-74ac8096cd48" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_5d345784-9562-4156-b5e3-05c12fcd6c24" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_02fc3288-b0a2-43db-9927-35fbb766c657" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountsPayableCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_5d345784-9562-4156-b5e3-05c12fcd6c24" xlink:to="loc_us-gaap_AccountsPayableCurrent_02fc3288-b0a2-43db-9927-35fbb766c657" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedRoyaltiesCurrent_d79ece16-c824-4368-8db2-ad859b31287e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccruedRoyaltiesCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_5d345784-9562-4156-b5e3-05c12fcd6c24" xlink:to="loc_us-gaap_AccruedRoyaltiesCurrent_d79ece16-c824-4368-8db2-ad859b31287e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_d95bb7c3-c584-4a82-bb12-561d9cc03cbf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_5d345784-9562-4156-b5e3-05c12fcd6c24" xlink:to="loc_us-gaap_LongTermDebtCurrent_d95bb7c3-c584-4a82-bb12-561d9cc03cbf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AccruedGovernmentRebates_3791eaac-8850-48b0-81df-d2019c4dc8cd" xlink:href="anip-20231231.xsd#anip_AccruedGovernmentRebates"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_5d345784-9562-4156-b5e3-05c12fcd6c24" xlink:to="loc_anip_AccruedGovernmentRebates_3791eaac-8850-48b0-81df-d2019c4dc8cd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TaxesPayableCurrent_940f8aeb-d0e3-477c-b454-215f9d947f92" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TaxesPayableCurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_5d345784-9562-4156-b5e3-05c12fcd6c24" xlink:to="loc_us-gaap_TaxesPayableCurrent_940f8aeb-d0e3-477c-b454-215f9d947f92" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_976a4f90-ec9b-401f-92dd-e1c5e4a07aa5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeRelatedLiabilitiesCurrent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_5d345784-9562-4156-b5e3-05c12fcd6c24" xlink:to="loc_us-gaap_EmployeeRelatedLiabilitiesCurrent_976a4f90-ec9b-401f-92dd-e1c5e4a07aa5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ReturnedGoodsReserve_810ad857-8612-4dae-847d-9e20a2bbb912" xlink:href="anip-20231231.xsd#anip_ReturnedGoodsReserve"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_5d345784-9562-4156-b5e3-05c12fcd6c24" xlink:to="loc_anip_ReturnedGoodsReserve_810ad857-8612-4dae-847d-9e20a2bbb912" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_eff00371-371f-494b-9d4b-7bfa16a9667e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_5d345784-9562-4156-b5e3-05c12fcd6c24" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_eff00371-371f-494b-9d4b-7bfa16a9667e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationContingentConsiderationLiabilityCurrent_8af9b3c1-0bb9-4cf0-93c6-bd815689386c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationContingentConsiderationLiabilityCurrent"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LiabilitiesCurrent_5d345784-9562-4156-b5e3-05c12fcd6c24" xlink:to="loc_us-gaap_BusinessCombinationContingentConsiderationLiabilityCurrent_8af9b3c1-0bb9-4cf0-93c6-bd815689386c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_74063fe4-4431-46c6-9447-d993d02b8cbc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_39d411ac-04f8-423c-8b49-e434fb335833" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_74063fe4-4431-46c6-9447-d993d02b8cbc" xlink:to="loc_us-gaap_CommonStockValue_39d411ac-04f8-423c-8b49-e434fb335833" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_ClassCSpecialStockValue_4dfb60c8-05c3-4838-a94b-36d7a81663d0" xlink:href="anip-20231231.xsd#anip_ClassCSpecialStockValue"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_74063fe4-4431-46c6-9447-d993d02b8cbc" xlink:to="loc_anip_ClassCSpecialStockValue_4dfb60c8-05c3-4838-a94b-36d7a81663d0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValue_5fc79c43-51e7-41b9-af19-7871b8634c09" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockValue"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_74063fe4-4431-46c6-9447-d993d02b8cbc" xlink:to="loc_us-gaap_PreferredStockValue_5fc79c43-51e7-41b9-af19-7871b8634c09" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockCommonValue_1b99ef63-8f03-4cc2-902d-6094c2c70214" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockCommonValue"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_74063fe4-4431-46c6-9447-d993d02b8cbc" xlink:to="loc_us-gaap_TreasuryStockCommonValue_1b99ef63-8f03-4cc2-902d-6094c2c70214" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_143e4512-24ce-451c-8f77-0258873e30b7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_74063fe4-4431-46c6-9447-d993d02b8cbc" xlink:to="loc_us-gaap_AdditionalPaidInCapital_143e4512-24ce-451c-8f77-0258873e30b7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_a1cbc144-b1b7-48b3-a865-50b8a8edbedd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_74063fe4-4431-46c6-9447-d993d02b8cbc" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_a1cbc144-b1b7-48b3-a865-50b8a8edbedd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_8805893a-1dfc-4f7d-8666-08d8bf8500f4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_StockholdersEquity_74063fe4-4431-46c6-9447-d993d02b8cbc" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_8805893a-1dfc-4f7d-8666-08d8bf8500f4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_9da09480-100c-4dcb-b42e-2750c1f301c9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_49249732-1694-414d-b20f-18ebb11623c6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_9da09480-100c-4dcb-b42e-2750c1f301c9" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_49249732-1694-414d-b20f-18ebb11623c6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedCashCurrent_72772c35-5f69-460e-85c0-8f4c2e50dba9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestrictedCashCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_9da09480-100c-4dcb-b42e-2750c1f301c9" xlink:to="loc_us-gaap_RestrictedCashCurrent_72772c35-5f69-460e-85c0-8f4c2e50dba9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_d6a575b7-1199-4be3-a15f-176e83fc9849" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountsReceivableNetCurrent"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_9da09480-100c-4dcb-b42e-2750c1f301c9" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_d6a575b7-1199-4be3-a15f-176e83fc9849" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_c7e54feb-e858-4902-8dc5-00d0325daefa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryNet"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_9da09480-100c-4dcb-b42e-2750c1f301c9" xlink:to="loc_us-gaap_InventoryNet_c7e54feb-e858-4902-8dc5-00d0325daefa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsHeldForSaleNotPartOfDisposalGroupCurrent_5babe554-6f31-48cc-89fb-a6dde79f3bb7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsHeldForSaleNotPartOfDisposalGroupCurrent"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_9da09480-100c-4dcb-b42e-2750c1f301c9" xlink:to="loc_us-gaap_AssetsHeldForSaleNotPartOfDisposalGroupCurrent_5babe554-6f31-48cc-89fb-a6dde79f3bb7" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseCurrent_df1620c1-3e10-4ce1-ad2b-374590fd1b53" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PrepaidExpenseCurrent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_9da09480-100c-4dcb-b42e-2750c1f301c9" xlink:to="loc_us-gaap_PrepaidExpenseCurrent_df1620c1-3e10-4ce1-ad2b-374590fd1b53" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_PrepaidIncomeTaxesNet_0f3e9ab1-cfff-4dbe-9a3c-c8167b0690a5" xlink:href="anip-20231231.xsd#anip_PrepaidIncomeTaxesNet"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_AssetsCurrent_9da09480-100c-4dcb-b42e-2750c1f301c9" xlink:to="loc_anip_PrepaidIncomeTaxesNet_0f3e9ab1-cfff-4dbe-9a3c-c8167b0690a5" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/ConsolidatedStatementsofOperations" xlink:type="simple" xlink:href="anip-20231231.xsd#ConsolidatedStatementsofOperations"/>
  <link:calculationLink xlink:role="http://www.anipharmaceuticals.com/role/ConsolidatedStatementsofOperations" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_e2c3e7d6-7da7-45b9-a1ba-6efb337bb204" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_f2285d3f-834e-4b07-b7a6-c26f02b5294a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_e2c3e7d6-7da7-45b9-a1ba-6efb337bb204" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_f2285d3f-834e-4b07-b7a6-c26f02b5294a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_7e90c759-bcbb-4367-b19c-6ac57b4c2afd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLoss_e2c3e7d6-7da7-45b9-a1ba-6efb337bb204" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_7e90c759-bcbb-4367-b19c-6ac57b4c2afd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_781a8a63-4e4b-42a3-bbcd-9bda374fd02d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockDividendsIncomeStatementImpact_7a7ebd18-ef81-4ab5-b24c-cf365e8629dc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockDividendsIncomeStatementImpact"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_781a8a63-4e4b-42a3-bbcd-9bda374fd02d" xlink:to="loc_us-gaap_PreferredStockDividendsIncomeStatementImpact_7a7ebd18-ef81-4ab5-b24c-cf365e8629dc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_d57668aa-04cf-4662-8e7a-f6312b6210c6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_781a8a63-4e4b-42a3-bbcd-9bda374fd02d" xlink:to="loc_us-gaap_NetIncomeLoss_d57668aa-04cf-4662-8e7a-f6312b6210c6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostsAndExpenses_cf81d117-5e0f-47eb-ba49-252d5a927c85" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CostsAndExpenses"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization_923c9e07-0317-4687-b4a4-456905aaa5c9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_cf81d117-5e0f-47eb-ba49-252d5a927c85" xlink:to="loc_us-gaap_CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization_923c9e07-0317-4687-b4a4-456905aaa5c9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpense_45357a22-2a5e-4a0f-b713-603ee092d57f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ResearchAndDevelopmentExpense"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_cf81d117-5e0f-47eb-ba49-252d5a927c85" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpense_45357a22-2a5e-4a0f-b713-603ee092d57f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_01f4173a-94e3-48ac-b207-769608877c90" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_cf81d117-5e0f-47eb-ba49-252d5a927c85" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_01f4173a-94e3-48ac-b207-769608877c90" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationAndAmortization_e295b233-dab9-4d0f-8c4a-be1164b1ea39" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DepreciationAndAmortization"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_cf81d117-5e0f-47eb-ba49-252d5a927c85" xlink:to="loc_us-gaap_DepreciationAndAmortization_e295b233-dab9-4d0f-8c4a-be1164b1ea39" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationContingentConsiderationArrangementsChangeInAmountOfContingentConsiderationLiability1_728f24b8-2c5e-4363-ae7b-4ddb1ae442e9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BusinessCombinationContingentConsiderationArrangementsChangeInAmountOfContingentConsiderationLiability1"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_cf81d117-5e0f-47eb-ba49-252d5a927c85" xlink:to="loc_us-gaap_BusinessCombinationContingentConsiderationArrangementsChangeInAmountOfContingentConsiderationLiability1_728f24b8-2c5e-4363-ae7b-4ddb1ae442e9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossRelatedToLitigationSettlement_d4e31213-aa45-4dff-b96a-00eba2ec7b31" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainLossRelatedToLitigationSettlement"/>
    <link:calculationArc order="6" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_cf81d117-5e0f-47eb-ba49-252d5a927c85" xlink:to="loc_us-gaap_GainLossRelatedToLitigationSettlement_d4e31213-aa45-4dff-b96a-00eba2ec7b31" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_CortrophinPreLaunchCharges_fb6fd904-6504-498a-ac16-dcd98cc7d87a" xlink:href="anip-20231231.xsd#anip_CortrophinPreLaunchCharges"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_cf81d117-5e0f-47eb-ba49-252d5a927c85" xlink:to="loc_anip_CortrophinPreLaunchCharges_fb6fd904-6504-498a-ac16-dcd98cc7d87a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringAndRelatedCostIncurredCost_f9a081a9-a007-4c4c-8793-2e467a35d7e2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestructuringAndRelatedCostIncurredCost"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_cf81d117-5e0f-47eb-ba49-252d5a927c85" xlink:to="loc_us-gaap_RestructuringAndRelatedCostIncurredCost_f9a081a9-a007-4c4c-8793-2e467a35d7e2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ImpairmentOfIntangibleAssetsFinitelived_2aee065a-6c4e-45d3-bd3c-bfc6fff039f3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ImpairmentOfIntangibleAssetsFinitelived"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CostsAndExpenses_cf81d117-5e0f-47eb-ba49-252d5a927c85" xlink:to="loc_us-gaap_ImpairmentOfIntangibleAssetsFinitelived_2aee065a-6c4e-45d3-bd3c-bfc6fff039f3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_adf89a14-c002-46a3-9d4f-b507fa212827" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_504d0fd8-2ef7-47de-8608-84162c790f5d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_adf89a14-c002-46a3-9d4f-b507fa212827" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_504d0fd8-2ef7-47de-8608-84162c790f5d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostsAndExpenses_11172a8d-8a7c-499b-b1ae-eafe3c66b194" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CostsAndExpenses"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingIncomeLoss_adf89a14-c002-46a3-9d4f-b507fa212827" xlink:to="loc_us-gaap_CostsAndExpenses_11172a8d-8a7c-499b-b1ae-eafe3c66b194" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_f377836a-e57c-4a48-af80-e7f9283d3d7b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_34567e96-22da-42cd-bc63-cf4c307283db" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_f377836a-e57c-4a48-af80-e7f9283d3d7b" xlink:to="loc_us-gaap_OperatingIncomeLoss_34567e96-22da-42cd-bc63-cf4c307283db" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_5615bfca-c41f-4b7b-a67a-a73534a65cf3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeExpenseNonoperatingNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_f377836a-e57c-4a48-af80-e7f9283d3d7b" xlink:to="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_5615bfca-c41f-4b7b-a67a-a73534a65cf3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_0e0e8928-8820-473d-8b10-b4f569d93693" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_f377836a-e57c-4a48-af80-e7f9283d3d7b" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_0e0e8928-8820-473d-8b10-b4f569d93693" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/ConsolidatedStatementsofComprehensiveIncomeLoss" xlink:type="simple" xlink:href="anip-20231231.xsd#ConsolidatedStatementsofComprehensiveIncomeLoss"/>
  <link:calculationLink xlink:role="http://www.anipharmaceuticals.com/role/ConsolidatedStatementsofComprehensiveIncomeLoss" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_81f0d605-3b02-4992-942e-8ea70dd5c85e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossAfterReclassificationAndTax_451510fc-66e7-4b62-a195-1137d38a9b1a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossAfterReclassificationAndTax"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_81f0d605-3b02-4992-942e-8ea70dd5c85e" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossAfterReclassificationAndTax_451510fc-66e7-4b62-a195-1137d38a9b1a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_c4d735fa-37fd-4cd9-a6af-c223ef175d91" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_81f0d605-3b02-4992-942e-8ea70dd5c85e" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_c4d735fa-37fd-4cd9-a6af-c223ef175d91" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_fe10d5e4-63f3-4a46-a078-bf8838ff9a24" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_a025a811-91bb-4293-9fc7-f38d58c1f8e8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_fe10d5e4-63f3-4a46-a078-bf8838ff9a24" xlink:to="loc_us-gaap_NetIncomeLoss_a025a811-91bb-4293-9fc7-f38d58c1f8e8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_07c891bb-5984-4960-bc0a-eac9ecf09f35" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_ComprehensiveIncomeNetOfTax_fe10d5e4-63f3-4a46-a078-bf8838ff9a24" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_07c891bb-5984-4960-bc0a-eac9ecf09f35" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/ConsolidatedStatementsofCashFlows" xlink:type="simple" xlink:href="anip-20231231.xsd#ConsolidatedStatementsofCashFlows"/>
  <link:calculationLink xlink:role="http://www.anipharmaceuticals.com/role/ConsolidatedStatementsofCashFlows" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_9d32c71d-495f-4449-83e3-ef5bdea22442" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_6ec11f25-d95b-488d-8388-918f9790ae50" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_9d32c71d-495f-4449-83e3-ef5bdea22442" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_6ec11f25-d95b-488d-8388-918f9790ae50" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_62ea94c4-539e-4245-ad6d-2589bef878ed" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_9d32c71d-495f-4449-83e3-ef5bdea22442" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_62ea94c4-539e-4245-ad6d-2589bef878ed" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c85d9626-3189-4a23-87a6-5180cc15b32e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_9d32c71d-495f-4449-83e3-ef5bdea22442" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_c85d9626-3189-4a23-87a6-5180cc15b32e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_c4eeaa66-a0b3-48da-b8eb-fbad84673d97" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireIntangibleAssets_f6324f63-7d1e-40c8-8c23-7294bb9829cf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireIntangibleAssets"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_c4eeaa66-a0b3-48da-b8eb-fbad84673d97" xlink:to="loc_us-gaap_PaymentsToAcquireIntangibleAssets_f6324f63-7d1e-40c8-8c23-7294bb9829cf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired_efd1cdf6-3d15-4d0c-bd02-56faa48e6ee0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_c4eeaa66-a0b3-48da-b8eb-fbad84673d97" xlink:to="loc_us-gaap_PaymentsToAcquireBusinessesNetOfCashAcquired_efd1cdf6-3d15-4d0c-bd02-56faa48e6ee0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_3a5132ce-251a-4e69-872d-a47b9de03d3f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_c4eeaa66-a0b3-48da-b8eb-fbad84673d97" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_3a5132ce-251a-4e69-872d-a47b9de03d3f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment_b66dfe55-8356-444e-9cc2-037dbe332759" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_c4eeaa66-a0b3-48da-b8eb-fbad84673d97" xlink:to="loc_us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment_b66dfe55-8356-444e-9cc2-037dbe332759" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_7ee0271f-8f2b-40aa-bd92-b431545226ab" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensation"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_us-gaap_ShareBasedCompensation_7ee0271f-8f2b-40aa-bd92-b431545226ab" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_BusinessCombinationContingentConsiderationArrangementsChangeInAmountOfContingentConsiderationLiabilityCashFlow_65ee20d7-738d-4d3f-bba7-2f3925669767" xlink:href="anip-20231231.xsd#anip_BusinessCombinationContingentConsiderationArrangementsChangeInAmountOfContingentConsiderationLiabilityCashFlow"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_anip_BusinessCombinationContingentConsiderationArrangementsChangeInAmountOfContingentConsiderationLiabilityCashFlow_65ee20d7-738d-4d3f-bba7-2f3925669767" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_f82363ab-bfc1-4d56-9ecf-1af0bca2022f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxesAndTaxCredits"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_us-gaap_DeferredIncomeTaxesAndTaxCredits_f82363ab-bfc1-4d56-9ecf-1af0bca2022f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherDepreciationAndAmortization_535f509e-0347-49fc-897a-b9c63f31331a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherDepreciationAndAmortization"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_us-gaap_OtherDepreciationAndAmortization_535f509e-0347-49fc-897a-b9c63f31331a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetImpairmentCharges_a5a63eb8-ea3a-4c5c-9ab5-fcf22702ea92" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetImpairmentCharges"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_us-gaap_AssetImpairmentCharges_a5a63eb8-ea3a-4c5c-9ab5-fcf22702ea92" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_AcquiredInProcessReserachAndDevelopmentExpense_6123980f-ca46-4610-a17d-802b423193e2" xlink:href="anip-20231231.xsd#anip_AcquiredInProcessReserachAndDevelopmentExpense"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_anip_AcquiredInProcessReserachAndDevelopmentExpense_6123980f-ca46-4610-a17d-802b423193e2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_efe7ea86-801d-4628-bd39-9733a9ec01ea" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AmortizationOfFinancingCostsAndDiscounts"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_efe7ea86-801d-4628-bd39-9733a9ec01ea" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_79da8c52-8df3-410f-962b-4e3aeefd1028" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivable_79da8c52-8df3-410f-962b-4e3aeefd1028" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInventories_bc60c2ca-dbc9-43c5-ba26-cf0dc3e467f2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInInventories"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_us-gaap_IncreaseDecreaseInInventories_bc60c2ca-dbc9-43c5-ba26-cf0dc3e467f2" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_f4b44ff3-f506-4182-b072-1b470f3dcce9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInPrepaidExpense"/>
    <link:calculationArc order="10" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_f4b44ff3-f506-4182-b072-1b470f3dcce9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_IncreaseDecreaseInRoyaltyPayable_3e343a7e-b418-47f9-94d6-819898d1171d" xlink:href="anip-20231231.xsd#anip_IncreaseDecreaseInRoyaltyPayable"/>
    <link:calculationArc order="11" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_anip_IncreaseDecreaseInRoyaltyPayable_3e343a7e-b418-47f9-94d6-819898d1171d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInIncomeTaxes_752310fc-2daf-46dc-b60e-d1ba0f6b7cd8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInIncomeTaxes"/>
    <link:calculationArc order="12" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_us-gaap_IncreaseDecreaseInIncomeTaxes_752310fc-2daf-46dc-b60e-d1ba0f6b7cd8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_IncreaseDecreaseAccruedGovernmentRebates_b96fa015-7044-414f-bc74-2ebf7eb3b5e8" xlink:href="anip-20231231.xsd#anip_IncreaseDecreaseAccruedGovernmentRebates"/>
    <link:calculationArc order="13" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_anip_IncreaseDecreaseAccruedGovernmentRebates_b96fa015-7044-414f-bc74-2ebf7eb3b5e8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_IncreaseDecreaseInReturnedGoodsReserve_49cc2e61-209d-4604-a7e4-25dbf7158a63" xlink:href="anip-20231231.xsd#anip_IncreaseDecreaseInReturnedGoodsReserve"/>
    <link:calculationArc order="14" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_anip_IncreaseDecreaseInReturnedGoodsReserve_49cc2e61-209d-4604-a7e4-25dbf7158a63" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_IncreaseDecreaseOfAccruedExpensesCompensationAndOthers_3e0bbe11-bc76-4a77-b553-968bfbd0e1cb" xlink:href="anip-20231231.xsd#anip_IncreaseDecreaseOfAccruedExpensesCompensationAndOthers"/>
    <link:calculationArc order="15" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_anip_IncreaseDecreaseOfAccruedExpensesCompensationAndOthers_3e0bbe11-bc76-4a77-b553-968bfbd0e1cb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayable_beab7521-3629-40ef-9c3e-2c68026de431" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInAccountsPayable"/>
    <link:calculationArc order="16" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayable_beab7521-3629-40ef-9c3e-2c68026de431" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_ac6decef-e464-4c0f-9691-3c5e71ca5c03" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainsLossesOnExtinguishmentOfDebt"/>
    <link:calculationArc order="17" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_ac6decef-e464-4c0f-9691-3c5e71ca5c03" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_b0aa187b-64f1-40e2-bcc5-5498694616f6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProfitLoss"/>
    <link:calculationArc order="18" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_us-gaap_ProfitLoss_b0aa187b-64f1-40e2-bcc5-5498694616f6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnDispositionOfIntangibleAssets_3f46d3f2-be1d-4319-bacd-9fb4974f4504" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainLossOnDispositionOfIntangibleAssets"/>
    <link:calculationArc order="19" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_us-gaap_GainLossOnDispositionOfIntangibleAssets_3f46d3f2-be1d-4319-bacd-9fb4974f4504" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense_878b3a54-8435-4a43-906e-246dc6b52042" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense"/>
    <link:calculationArc order="20" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_fa064afe-2dc2-49b9-a951-23578a583268" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAssetAmortizationExpense_878b3a54-8435-4a43-906e-246dc6b52042" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1125e101-52c8-48b1-90c8-f6b7002dfaa8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromLongTermLinesOfCredit_92e191ec-06e9-40e3-8541-2758bb56fcfe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromLongTermLinesOfCredit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1125e101-52c8-48b1-90c8-f6b7002dfaa8" xlink:to="loc_us-gaap_ProceedsFromLongTermLinesOfCredit_92e191ec-06e9-40e3-8541-2758bb56fcfe" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfOtherLongTermDebt_611e28cf-2518-4833-9920-5ec7e248911f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RepaymentsOfOtherLongTermDebt"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1125e101-52c8-48b1-90c8-f6b7002dfaa8" xlink:to="loc_us-gaap_RepaymentsOfOtherLongTermDebt_611e28cf-2518-4833-9920-5ec7e248911f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromStockOptionsExercised_4efc6c6d-4858-4de3-ae9a-8633328ce8ff" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromStockOptionsExercised"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1125e101-52c8-48b1-90c8-f6b7002dfaa8" xlink:to="loc_us-gaap_ProceedsFromStockOptionsExercised_4efc6c6d-4858-4de3-ae9a-8633328ce8ff" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDividends_e591fd12-033a-4de6-8078-860b61bf2490" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsOfDividends"/>
    <link:calculationArc order="4" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1125e101-52c8-48b1-90c8-f6b7002dfaa8" xlink:to="loc_us-gaap_PaymentsOfDividends_e591fd12-033a-4de6-8078-860b61bf2490" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfConvertiblePreferredStock_db3a04b9-c63c-43fe-bdfb-d815f47ad61d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromIssuanceOfConvertiblePreferredStock"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1125e101-52c8-48b1-90c8-f6b7002dfaa8" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfConvertiblePreferredStock_db3a04b9-c63c-43fe-bdfb-d815f47ad61d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_e7ac72c5-18e1-4e59-8893-a9328ba86153" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromIssuanceOfCommonStock"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1125e101-52c8-48b1-90c8-f6b7002dfaa8" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_e7ac72c5-18e1-4e59-8893-a9328ba86153" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_342bf80e-0f32-4bbc-90d6-f3a6b60a37c1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsForRepurchaseOfCommonStock"/>
    <link:calculationArc order="7" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1125e101-52c8-48b1-90c8-f6b7002dfaa8" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_342bf80e-0f32-4bbc-90d6-f3a6b60a37c1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfLinesOfCredit_59157391-cfbc-466e-acac-0757a29675fd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RepaymentsOfLinesOfCredit"/>
    <link:calculationArc order="8" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1125e101-52c8-48b1-90c8-f6b7002dfaa8" xlink:to="loc_us-gaap_RepaymentsOfLinesOfCredit_59157391-cfbc-466e-acac-0757a29675fd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromLinesOfCredit_2a0aebc8-339d-456e-8257-64e133742921" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromLinesOfCredit"/>
    <link:calculationArc order="9" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1125e101-52c8-48b1-90c8-f6b7002dfaa8" xlink:to="loc_us-gaap_ProceedsFromLinesOfCredit_2a0aebc8-339d-456e-8257-64e133742921" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfDebt_6c06a1d4-4ed7-4ba7-af07-9e150ea34665" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RepaymentsOfDebt"/>
    <link:calculationArc order="10" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1125e101-52c8-48b1-90c8-f6b7002dfaa8" xlink:to="loc_us-gaap_RepaymentsOfDebt_6c06a1d4-4ed7-4ba7-af07-9e150ea34665" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentForContingentConsiderationLiabilityFinancingActivities_002b7951-3ccb-4315-8479-f4b62ff2af8c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentForContingentConsiderationLiabilityFinancingActivities"/>
    <link:calculationArc order="11" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1125e101-52c8-48b1-90c8-f6b7002dfaa8" xlink:to="loc_us-gaap_PaymentForContingentConsiderationLiabilityFinancingActivities_002b7951-3ccb-4315-8479-f4b62ff2af8c" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_41830cd7-d4d4-4e37-9901-ed05fd2f07c5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_ade30edb-1423-4860-9c8c-fb45bf392844" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_41830cd7-d4d4-4e37-9901-ed05fd2f07c5" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_ade30edb-1423-4860-9c8c-fb45bf392844" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedCashCurrent_67fca621-3d3d-4f9d-a9dd-e4b6e33642c4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestrictedCashCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_41830cd7-d4d4-4e37-9901-ed05fd2f07c5" xlink:to="loc_us-gaap_RestrictedCashCurrent_67fca621-3d3d-4f9d-a9dd-e4b6e33642c4" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/INDEBTEDNESSFacilitycomponentsDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#INDEBTEDNESSFacilitycomponentsDetails"/>
  <link:calculationLink xlink:role="http://www.anipharmaceuticals.com/role/INDEBTEDNESSFacilitycomponentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_63961029-ff9a-46bf-a1f6-ffcf53f3936c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtNoncurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_LongTermDebtGrossNonCurrent_0eb2548e-e0e6-493f-b57c-6e323afef58a" xlink:href="anip-20231231.xsd#anip_LongTermDebtGrossNonCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebtNoncurrent_63961029-ff9a-46bf-a1f6-ffcf53f3936c" xlink:to="loc_anip_LongTermDebtGrossNonCurrent_0eb2548e-e0e6-493f-b57c-6e323afef58a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredFinanceCostsNoncurrentNet_0eba574f-7112-4d21-b9bf-6e918b8b4937" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredFinanceCostsNoncurrentNet"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebtNoncurrent_63961029-ff9a-46bf-a1f6-ffcf53f3936c" xlink:to="loc_us-gaap_DeferredFinanceCostsNoncurrentNet_0eba574f-7112-4d21-b9bf-6e918b8b4937" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_f593ba43-a3a0-4d33-aae2-f9e9e10f5b01" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredFinanceCostsCurrentNet_12107c2e-91d0-45ab-a8ed-70abc015a43d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredFinanceCostsCurrentNet"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebtCurrent_f593ba43-a3a0-4d33-aae2-f9e9e10f5b01" xlink:to="loc_us-gaap_DeferredFinanceCostsCurrentNet_12107c2e-91d0-45ab-a8ed-70abc015a43d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_LongTermDebtGrossCurrent_a945423b-9cb9-411b-8d1b-02c5072ba9d0" xlink:href="anip-20231231.xsd#anip_LongTermDebtGrossCurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebtCurrent_f593ba43-a3a0-4d33-aae2-f9e9e10f5b01" xlink:to="loc_anip_LongTermDebtGrossCurrent_a945423b-9cb9-411b-8d1b-02c5072ba9d0" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/INDEBTEDNESSOutstandingDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#INDEBTEDNESSOutstandingDetails"/>
  <link:calculationLink xlink:role="http://www.anipharmaceuticals.com/role/INDEBTEDNESSOutstandingDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredFinanceCostsNet_09e13526-d54f-4306-b3e9-404d79c2acb1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredFinanceCostsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredFinanceCostsCurrentNet_de268640-c1ac-4378-a06b-df1a035e73d5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredFinanceCostsCurrentNet"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredFinanceCostsNet_09e13526-d54f-4306-b3e9-404d79c2acb1" xlink:to="loc_us-gaap_DeferredFinanceCostsCurrentNet_de268640-c1ac-4378-a06b-df1a035e73d5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredFinanceCostsNoncurrentNet_731792e3-18e1-441e-b543-5ef2d221286e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredFinanceCostsNoncurrentNet"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredFinanceCostsNet_09e13526-d54f-4306-b3e9-404d79c2acb1" xlink:to="loc_us-gaap_DeferredFinanceCostsNoncurrentNet_731792e3-18e1-441e-b543-5ef2d221286e" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/INDEBTEDNESSCreditfacilitymaturityDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#INDEBTEDNESSCreditfacilitymaturityDetails"/>
  <link:calculationLink xlink:role="http://www.anipharmaceuticals.com/role/INDEBTEDNESSCreditfacilitymaturityDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_9cb64dcc-7c11-43e5-b048-e5a8465155dd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebt"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_4b0df2fa-8165-4d87-8642-1432ebb894d5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_9cb64dcc-7c11-43e5-b048-e5a8465155dd" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_4b0df2fa-8165-4d87-8642-1432ebb894d5" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_e745b612-3300-4bea-8405-a58671f1092a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_9cb64dcc-7c11-43e5-b048-e5a8465155dd" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_e745b612-3300-4bea-8405-a58671f1092a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_53533159-521a-4ab4-ba80-da184510b42b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_9cb64dcc-7c11-43e5-b048-e5a8465155dd" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_53533159-521a-4ab4-ba80-da184510b42b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_e733583b-bebb-4f4e-aa06-366ea84db1a0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LongTermDebt_9cb64dcc-7c11-43e5-b048-e5a8465155dd" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_e733583b-bebb-4f4e-aa06-366ea84db1a0" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/INDEBTEDNESSInterestDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#INDEBTEDNESSInterestDetails"/>
  <link:calculationLink xlink:role="http://www.anipharmaceuticals.com/role/INDEBTEDNESSInterestDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseDebt_5d574978-9f65-484e-88b4-df222207bc74" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpenseDebt"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseDebtExcludingAmortization_8b11e812-3932-4412-ae0c-5529a83b0d21" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpenseDebtExcludingAmortization"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpenseDebt_5d574978-9f65-484e-88b4-df222207bc74" xlink:to="loc_us-gaap_InterestExpenseDebtExcludingAmortization_8b11e812-3932-4412-ae0c-5529a83b0d21" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfFinancingCosts_255e667d-6892-49d0-86f3-413bf5dbb667" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AmortizationOfFinancingCosts"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpenseDebt_5d574978-9f65-484e-88b4-df222207bc74" xlink:to="loc_us-gaap_AmortizationOfFinancingCosts_255e667d-6892-49d0-86f3-413bf5dbb667" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestCostsCapitalizedAdjustment_c5283ede-2e80-49bc-8ded-d57e8f56d620" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestCostsCapitalizedAdjustment"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InterestExpenseDebt_5d574978-9f65-484e-88b4-df222207bc74" xlink:to="loc_us-gaap_InterestCostsCapitalizedAdjustment_c5283ede-2e80-49bc-8ded-d57e8f56d620" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/INVENTORIESScheduleofinventoryDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#INVENTORIESScheduleofinventoryDetails"/>
  <link:calculationLink xlink:role="http://www.anipharmaceuticals.com/role/INVENTORIESScheduleofinventoryDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryGross_edf9c67d-0919-42ff-bd34-b659090a9a5b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryRawMaterials_563acb1d-3ac5-4547-b3dc-efb0a4ff077a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryRawMaterials"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryGross_edf9c67d-0919-42ff-bd34-b659090a9a5b" xlink:to="loc_us-gaap_InventoryRawMaterials_563acb1d-3ac5-4547-b3dc-efb0a4ff077a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetailRelatedInventoryPackagingAndOtherSupplies_8c645133-644c-4c01-89bd-c4fdaa0bad2e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetailRelatedInventoryPackagingAndOtherSupplies"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryGross_edf9c67d-0919-42ff-bd34-b659090a9a5b" xlink:to="loc_us-gaap_RetailRelatedInventoryPackagingAndOtherSupplies_8c645133-644c-4c01-89bd-c4fdaa0bad2e" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryWorkInProcess_ae0709c0-acaf-4a81-8bea-598b10624458" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryWorkInProcess"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryGross_edf9c67d-0919-42ff-bd34-b659090a9a5b" xlink:to="loc_us-gaap_InventoryWorkInProcess_ae0709c0-acaf-4a81-8bea-598b10624458" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryFinishedGoods_be94012d-11d1-4b42-880a-4089744a84d8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InventoryFinishedGoods"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_InventoryGross_edf9c67d-0919-42ff-bd34-b659090a9a5b" xlink:to="loc_us-gaap_InventoryFinishedGoods_be94012d-11d1-4b42-880a-4089744a84d8" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/PROPERTYANDEQUIPMENTNETScheduleofpropertyandequipmentDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#PROPERTYANDEQUIPMENTNETScheduleofpropertyandequipmentDetails"/>
  <link:calculationLink xlink:role="http://www.anipharmaceuticals.com/role/PROPERTYANDEQUIPMENTNETScheduleofpropertyandequipmentDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_7c39a140-ba84-4eb6-8258-413e0d857623" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_6baac77b-676e-4aef-9cb1-2efdd9b44990" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_7c39a140-ba84-4eb6-8258-413e0d857623" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_6baac77b-676e-4aef-9cb1-2efdd9b44990" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_1c158bb3-ae13-44ec-94f3-f4a99175bccf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNet_7c39a140-ba84-4eb6-8258-413e0d857623" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_1c158bb3-ae13-44ec-94f3-f4a99175bccf" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/GOODWILLANDINTANGIBLEASSETSAmortizationDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#GOODWILLANDINTANGIBLEASSETSAmortizationDetails"/>
  <link:calculationLink xlink:role="http://www.anipharmaceuticals.com/role/GOODWILLANDINTANGIBLEASSETSAmortizationDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_409e2ca1-2d8c-4193-84e3-33ad96148b5f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_38603921-6923-4ac2-acf6-550b54c70a05" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_409e2ca1-2d8c-4193-84e3-33ad96148b5f" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseNextTwelveMonths_38603921-6923-4ac2-acf6-550b54c70a05" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_cb6f10b3-6fa2-458b-8a07-6a73fabef9d1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_409e2ca1-2d8c-4193-84e3-33ad96148b5f" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearTwo_cb6f10b3-6fa2-458b-8a07-6a73fabef9d1" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_9c8300bc-0eae-4f8b-98e5-4e379083bff4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_409e2ca1-2d8c-4193-84e3-33ad96148b5f" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearThree_9c8300bc-0eae-4f8b-98e5-4e379083bff4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_9536f111-3dc3-47de-84e5-9ad0505fc071" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_409e2ca1-2d8c-4193-84e3-33ad96148b5f" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFour_9536f111-3dc3-47de-84e5-9ad0505fc071" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive_43a69744-29ff-4a8b-bbeb-c698a7b8ef0f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_409e2ca1-2d8c-4193-84e3-33ad96148b5f" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseYearFive_43a69744-29ff-4a8b-bbeb-c698a7b8ef0f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive_67802692-1059-4c32-82b9-26c2b6339eaf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsNet_409e2ca1-2d8c-4193-84e3-33ad96148b5f" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAmortizationExpenseAfterYearFive_67802692-1059-4c32-82b9-26c2b6339eaf" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/EARNINGSLOSSPERSHAREDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#EARNINGSLOSSPERSHAREDetails"/>
  <link:calculationLink xlink:role="http://www.anipharmaceuticals.com/role/EARNINGSLOSSPERSHAREDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_170e055b-2ca2-440d-8afc-34734283d1fd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_605d6d98-844c-4250-a591-8df28333bcba" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_170e055b-2ca2-440d-8afc-34734283d1fd" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_605d6d98-844c-4250-a591-8df28333bcba" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_ff13eb7a-b292-4051-a7ef-d28ae3370c7f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_170e055b-2ca2-440d-8afc-34734283d1fd" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_ff13eb7a-b292-4051-a7ef-d28ae3370c7f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UndistributedEarnings_7ce0f8e9-7783-40d5-bd59-47d9add7263f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_UndistributedEarnings"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_20f23d89-e9d5-4cf4-bd3a-b9d1db2c04c9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_UndistributedEarnings_7ce0f8e9-7783-40d5-bd59-47d9add7263f" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_20f23d89-e9d5-4cf4-bd3a-b9d1db2c04c9" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_a4b42492-042f-44b5-8b6c-d45f96e78c48" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_UndistributedEarnings_7ce0f8e9-7783-40d5-bd59-47d9add7263f" xlink:to="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_a4b42492-042f-44b5-8b6c-d45f96e78c48" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UndistributedEarningsDiluted_32b1239f-a73a-4ae7-bd52-9b17ccb8380f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_UndistributedEarningsDiluted"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted_cf3da605-2563-42d9-8de7-efc005f08773" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_UndistributedEarningsDiluted_32b1239f-a73a-4ae7-bd52-9b17ccb8380f" xlink:to="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted_cf3da605-2563-42d9-8de7-efc005f08773" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_ba4e275b-d959-4503-bfc3-af31d9c58968" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_UndistributedEarningsDiluted_32b1239f-a73a-4ae7-bd52-9b17ccb8380f" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_ba4e275b-d959-4503-bfc3-af31d9c58968" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/INCOMETAXESProvisionDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#INCOMETAXESProvisionDetails"/>
  <link:calculationLink xlink:role="http://www.anipharmaceuticals.com/role/INCOMETAXESProvisionDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_f22720ae-dc38-40e4-8f95-a4fa2d4be50c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CurrentIncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentFederalTaxExpenseBenefit_90b3b403-0188-4d89-9c57-18b75aad909d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CurrentFederalTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_f22720ae-dc38-40e4-8f95-a4fa2d4be50c" xlink:to="loc_us-gaap_CurrentFederalTaxExpenseBenefit_90b3b403-0188-4d89-9c57-18b75aad909d" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentStateAndLocalTaxExpenseBenefit_3692cbce-649e-4299-b709-7fc0c56f3e40" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CurrentStateAndLocalTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_f22720ae-dc38-40e4-8f95-a4fa2d4be50c" xlink:to="loc_us-gaap_CurrentStateAndLocalTaxExpenseBenefit_3692cbce-649e-4299-b709-7fc0c56f3e40" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentForeignTaxExpenseBenefit_7266b047-d680-4167-a994-ba2f8c79c75b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CurrentForeignTaxExpenseBenefit"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_f22720ae-dc38-40e4-8f95-a4fa2d4be50c" xlink:to="loc_us-gaap_CurrentForeignTaxExpenseBenefit_7266b047-d680-4167-a994-ba2f8c79c75b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_f428b1d9-e916-4260-9fd2-48c5b2b39814" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredFederalIncomeTaxExpenseBenefit_c72c24fb-ddd3-403e-a770-9572ab5b7524" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredFederalIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_f428b1d9-e916-4260-9fd2-48c5b2b39814" xlink:to="loc_us-gaap_DeferredFederalIncomeTaxExpenseBenefit_c72c24fb-ddd3-403e-a770-9572ab5b7524" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit_b3167428-65b8-43e5-b092-ac697132ade4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_f428b1d9-e916-4260-9fd2-48c5b2b39814" xlink:to="loc_us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit_b3167428-65b8-43e5-b092-ac697132ade4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredForeignIncomeTaxExpenseBenefit_eb34e8ff-a359-49bd-9103-30e62ae49193" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredForeignIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_f428b1d9-e916-4260-9fd2-48c5b2b39814" xlink:to="loc_us-gaap_DeferredForeignIncomeTaxExpenseBenefit_eb34e8ff-a359-49bd-9103-30e62ae49193" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_95134039-e2aa-45a8-b850-639a72c3b3b2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ValuationAllowanceDeferredTaxAssetChangeInAmount_2fc413e0-5730-4e00-ae42-06ef11354bdd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ValuationAllowanceDeferredTaxAssetChangeInAmount"/>
    <link:calculationArc order="1" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_95134039-e2aa-45a8-b850-639a72c3b3b2" xlink:to="loc_us-gaap_ValuationAllowanceDeferredTaxAssetChangeInAmount_2fc413e0-5730-4e00-ae42-06ef11354bdd" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_8669f45d-0d96-4d9f-b6bb-c9eff29ba46f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CurrentIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_95134039-e2aa-45a8-b850-639a72c3b3b2" xlink:to="loc_us-gaap_CurrentIncomeTaxExpenseBenefit_8669f45d-0d96-4d9f-b6bb-c9eff29ba46f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_7e4acd60-3b43-4c12-9ec9-9ddeada38379" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_IncomeTaxExpenseBenefit_95134039-e2aa-45a8-b850-639a72c3b3b2" xlink:to="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_7e4acd60-3b43-4c12-9ec9-9ddeada38379" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/INCOMETAXESEffectiverateDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#INCOMETAXESEffectiverateDetails"/>
  <link:calculationLink xlink:role="http://www.anipharmaceuticals.com/role/INCOMETAXESEffectiverateDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_2892a09e-3d56-4c41-a945-a9a7b40b9dff" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectiveIncomeTaxRateContinuingOperations"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_99196e22-54e6-4768-9612-f447e56e47df" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_2892a09e-3d56-4c41-a945-a9a7b40b9dff" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_99196e22-54e6-4768-9612-f447e56e47df" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes_28f82bd7-b27b-42c1-ac6a-4ba56fc8bedb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_2892a09e-3d56-4c41-a945-a9a7b40b9dff" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes_28f82bd7-b27b-42c1-ac6a-4ba56fc8bedb" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationForeignIncomeTaxRateDifferential_130f04da-e353-449f-a29e-d76be4fefd1f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationForeignIncomeTaxRateDifferential"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_2892a09e-3d56-4c41-a945-a9a7b40b9dff" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationForeignIncomeTaxRateDifferential_130f04da-e353-449f-a29e-d76be4fefd1f" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationChangeInDeferredTaxAssetsValuationAllowance_5beb60e6-e6d3-4633-8846-abbba23af8f6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationChangeInDeferredTaxAssetsValuationAllowance"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_2892a09e-3d56-4c41-a945-a9a7b40b9dff" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationChangeInDeferredTaxAssetsValuationAllowance_5beb60e6-e6d3-4633-8846-abbba23af8f6" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments_58dc10d1-d32c-44aa-b3c6-88f15d27f121" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_2892a09e-3d56-4c41-a945-a9a7b40b9dff" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments_58dc10d1-d32c-44aa-b3c6-88f15d27f121" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationShareBasedCompensationExcessTaxBenefitPercent_865255f7-49d1-47cb-a4c8-66687c1fcb42" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationShareBasedCompensationExcessTaxBenefitPercent"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_2892a09e-3d56-4c41-a945-a9a7b40b9dff" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationShareBasedCompensationExcessTaxBenefitPercent_865255f7-49d1-47cb-a4c8-66687c1fcb42" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationNondeductibleExpense_b6661f26-0273-4c57-bba5-0dcfface1d80" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationNondeductibleExpense"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_2892a09e-3d56-4c41-a945-a9a7b40b9dff" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationNondeductibleExpense_b6661f26-0273-4c57-bba5-0dcfface1d80" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_anip_EffectiveIncomeTaxRateReconciliationStateAndForeignIncomeTaxes_58d03e75-14ba-4241-876b-a4220e95d21b" xlink:href="anip-20231231.xsd#anip_EffectiveIncomeTaxRateReconciliationStateAndForeignIncomeTaxes"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_2892a09e-3d56-4c41-a945-a9a7b40b9dff" xlink:to="loc_anip_EffectiveIncomeTaxRateReconciliationStateAndForeignIncomeTaxes_58d03e75-14ba-4241-876b-a4220e95d21b" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxCredits_7f479e93-d1df-4e4c-8d79-c0f5ff695f60" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationTaxCredits"/>
    <link:calculationArc order="9" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_2892a09e-3d56-4c41-a945-a9a7b40b9dff" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationTaxCredits_7f479e93-d1df-4e4c-8d79-c0f5ff695f60" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/INCOMETAXESDeferredtaxDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#INCOMETAXESDeferredtaxDetails"/>
  <link:calculationLink xlink:role="http://www.anipharmaceuticals.com/role/INCOMETAXESDeferredtaxDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilities_8fe25147-24b9-4ba0-b6ee-80ef8a4e0a7e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxLiabilities"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesPropertyPlantAndEquipment_f1fbb7c2-ce60-450d-a51d-7487d7170fe3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxLiabilitiesPropertyPlantAndEquipment"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_8fe25147-24b9-4ba0-b6ee-80ef8a4e0a7e" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesPropertyPlantAndEquipment_f1fbb7c2-ce60-450d-a51d-7487d7170fe3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxLiabilitiesOther_91c03119-5c23-4f1c-9ed9-14ef4cbf68aa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxLiabilitiesOther"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredIncomeTaxLiabilities_8fe25147-24b9-4ba0-b6ee-80ef8a4e0a7e" xlink:to="loc_us-gaap_DeferredTaxLiabilitiesOther_91c03119-5c23-4f1c-9ed9-14ef4cbf68aa" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_b8bf79aa-3308-472f-bfa1-207476132059" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxAssetsLiabilitiesNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsGross_e3ab1377-e46d-49b7-811d-502a3bfa4934" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxAssetsGross"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_b8bf79aa-3308-472f-bfa1-207476132059" xlink:to="loc_us-gaap_DeferredTaxAssetsGross_e3ab1377-e46d-49b7-811d-502a3bfa4934" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilities_fddff5f5-51fc-45fa-ac26-92f1298be886" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxLiabilities"/>
    <link:calculationArc order="2" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_b8bf79aa-3308-472f-bfa1-207476132059" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilities_fddff5f5-51fc-45fa-ac26-92f1298be886" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsValuationAllowance_0a2c8ee1-146d-445a-9414-a17e42042ab3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxAssetsValuationAllowance"/>
    <link:calculationArc order="3" weight="-1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsLiabilitiesNet_b8bf79aa-3308-472f-bfa1-207476132059" xlink:to="loc_us-gaap_DeferredTaxAssetsValuationAllowance_0a2c8ee1-146d-445a-9414-a17e42042ab3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsGross_4b8eaa8f-1797-4a51-8563-fedc5913ac19" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxAssetsGross"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsAccruedLiabilities_bea22101-e215-4026-970b-baef343964f4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsAccruedLiabilities"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_4b8eaa8f-1797-4a51-8563-fedc5913ac19" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsAccruedLiabilities_bea22101-e215-4026-970b-baef343964f4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_8f74d6e7-8eb4-44f2-93bf-a72fa8fbf922" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_4b8eaa8f-1797-4a51-8563-fedc5913ac19" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost_8f74d6e7-8eb4-44f2-93bf-a72fa8fbf922" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsReturnsAndAllowances_42f539aa-c90e-4796-9480-dac074ee8146" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsReturnsAndAllowances"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_4b8eaa8f-1797-4a51-8563-fedc5913ac19" xlink:to="loc_us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsReturnsAndAllowances_42f539aa-c90e-4796-9480-dac074ee8146" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsInventory_014d0b3d-9882-4391-a61d-863ea5c81ea4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxAssetsInventory"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_4b8eaa8f-1797-4a51-8563-fedc5913ac19" xlink:to="loc_us-gaap_DeferredTaxAssetsInventory_014d0b3d-9882-4391-a61d-863ea5c81ea4" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsGoodwillAndIntangibleAssets_2f76d7bb-08e9-4d36-b0bd-8602942aa6ca" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxAssetsGoodwillAndIntangibleAssets"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_4b8eaa8f-1797-4a51-8563-fedc5913ac19" xlink:to="loc_us-gaap_DeferredTaxAssetsGoodwillAndIntangibleAssets_2f76d7bb-08e9-4d36-b0bd-8602942aa6ca" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwards_69d3932d-9689-4385-8a8b-ff7037608fcc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxAssetsOperatingLossCarryforwards"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_4b8eaa8f-1797-4a51-8563-fedc5913ac19" xlink:to="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwards_69d3932d-9689-4385-8a8b-ff7037608fcc" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsOther_0879c81f-f5e7-4a83-b9b5-833f4320a093" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxAssetsOther"/>
    <link:calculationArc order="7" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_4b8eaa8f-1797-4a51-8563-fedc5913ac19" xlink:to="loc_us-gaap_DeferredTaxAssetsOther_0879c81f-f5e7-4a83-b9b5-833f4320a093" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredTaxAssetsInProcessResearchAndDevelopment_32904a0f-4bf8-4845-8ed5-b129f4817c32" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredTaxAssetsInProcessResearchAndDevelopment"/>
    <link:calculationArc order="8" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_DeferredTaxAssetsGross_4b8eaa8f-1797-4a51-8563-fedc5913ac19" xlink:to="loc_us-gaap_DeferredTaxAssetsInProcessResearchAndDevelopment_32904a0f-4bf8-4845-8ed5-b129f4817c32" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/COMMITMENTSANDCONTINGENCIESLeasesexpenseDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#COMMITMENTSANDCONTINGENCIESLeasesexpenseDetails"/>
  <link:calculationLink xlink:role="http://www.anipharmaceuticals.com/role/COMMITMENTSANDCONTINGENCIESLeasesexpenseDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LeaseCost_0ba82a21-cca0-47ae-96e5-27812033e34e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LeaseCost"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseCost_d95e8fc8-379b-4618-8127-b3e943a6dea3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseCost"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LeaseCost_0ba82a21-cca0-47ae-96e5-27812033e34e" xlink:to="loc_us-gaap_OperatingLeaseCost_d95e8fc8-379b-4618-8127-b3e943a6dea3" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableLeaseCost_15902f28-0111-4a20-9ff9-b04f22717e6c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_VariableLeaseCost"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LeaseCost_0ba82a21-cca0-47ae-96e5-27812033e34e" xlink:to="loc_us-gaap_VariableLeaseCost_15902f28-0111-4a20-9ff9-b04f22717e6c" xlink:type="arc"/>
  </link:calculationLink>
  <link:roleRef roleURI="http://www.anipharmaceuticals.com/role/COMMITMENTSANDCONTINGENCIESLeasematurityDetails" xlink:type="simple" xlink:href="anip-20231231.xsd#COMMITMENTSANDCONTINGENCIESLeasematurityDetails"/>
  <link:calculationLink xlink:role="http://www.anipharmaceuticals.com/role/COMMITMENTSANDCONTINGENCIESLeasematurityDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiability_d15dc1d9-76aa-42cd-8315-012ca06dc71d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseLiability"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_37c7bc7d-8cbd-411c-95f1-6f3e55903481" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeaseLiability_d15dc1d9-76aa-42cd-8315-012ca06dc71d" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_37c7bc7d-8cbd-411c-95f1-6f3e55903481" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_ced57625-1821-4764-a675-cf974e8eaab0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_OperatingLeaseLiability_d15dc1d9-76aa-42cd-8315-012ca06dc71d" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_ced57625-1821-4764-a675-cf974e8eaab0" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_7d325834-bf91-4cb2-b546-d67879c6cfbc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_0fbad3e1-3837-44c7-a1c1-643522674ebf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <link:calculationArc order="1" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_7d325834-bf91-4cb2-b546-d67879c6cfbc" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths_0fbad3e1-3837-44c7-a1c1-643522674ebf" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_45aa1f6b-ee4c-4daf-8729-2bef3a8bef62" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo"/>
    <link:calculationArc order="2" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_7d325834-bf91-4cb2-b546-d67879c6cfbc" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo_45aa1f6b-ee4c-4daf-8729-2bef3a8bef62" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_eb4f0e7a-2bd4-45fb-b313-0a90c1d8c579" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree"/>
    <link:calculationArc order="3" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_7d325834-bf91-4cb2-b546-d67879c6cfbc" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree_eb4f0e7a-2bd4-45fb-b313-0a90c1d8c579" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_6b7d38a5-5494-46ed-8598-50ae1cb4d0a8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour"/>
    <link:calculationArc order="4" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_7d325834-bf91-4cb2-b546-d67879c6cfbc" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour_6b7d38a5-5494-46ed-8598-50ae1cb4d0a8" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_2bdcc0fb-8275-4935-8337-48e2d1ee098a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive"/>
    <link:calculationArc order="5" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_7d325834-bf91-4cb2-b546-d67879c6cfbc" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive_2bdcc0fb-8275-4935-8337-48e2d1ee098a" xlink:type="arc"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_2158086e-687c-47c2-8408-c1abbda65e74" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive"/>
    <link:calculationArc order="6" weight="1.0" xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item" xlink:from="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue_7d325834-bf91-4cb2-b546-d67879c6cfbc" xlink:to="loc_us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive_2158086e-687c-47c2-8408-c1abbda65e74" xlink:type="arc"/>
  </link:calculationLink>
</link:linkbase>
