At first, I also preferred to pass Optionals as parameter, but if you switch from an API-Designer perspective to a API-User perspective, you see the disadvantages.
For your example, where each parameter is optional, I would suggest to change the calculation method into an own class like follows:
Optional<String> p1 = otherObject.getP1();Optional<BigInteger> p2 = otherObject.getP2();MyCalculator mc = new MyCalculator();p1.map(mc::setP1);p2.map(mc::setP2);int result = mc.calculate();