Limit a double to two decimal places [duplicate] May 3, 2023 by Tarik You made simple mistake. This will work: [NSString stringWithFormat: @"%.2lf", total]