diff --git a/agate/utils.py b/agate/utils.py
index e18e5f0..834e262 100644
--- a/agate/utils.py
+++ b/agate/utils.py
@@ -109,12 +109,12 @@ class Quantiles(Sequence):
             raise ValueError('Value is greater than maximum quantile value.')
 
         if value == self._quantiles[-1]:
-            return len(self._quantiles) - 1
+            return Decimal(len(self._quantiles) - 1)
 
         while value >= self._quantiles[i + 1]:
             i += 1
 
-        return i
+        return Decimal(i)
 
 
 def median(data_sorted):

Percentiles should be Decimals
For consistency
diff --git a/tests/test_computations.py b/tests/test_computations.py
index bfc3a9b..c9c76b3 100644
--- a/tests/test_computations.py
+++ b/tests/test_computations.py
@@ -316,6 +316,8 @@ class TestTableComputation(unittest.TestCase):
         self.assertSequenceEqual(new_table.rows[500], (501, 50))
         self.assertSequenceEqual(new_table.rows[998], (999, 99))
         self.assertSequenceEqual(new_table.rows[999], (1000, 100))
+        self.assertIsInstance(new_table.columns['percentiles'][0], Decimal)
+        self.assertIsInstance(new_table.columns['percentiles'][-1], Decimal)
 
     def test_percentile_rank_invalid_types(self):
         with self.assertRaises(DataTypeError):

pip install -e .[dev]
parse_log_pytest
requirements.txt
parsedatetime>=2.0 pytest
apt-get update apt-get install -y gcc
3.9
requirements-py3.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
-e git+https://github.com/wireservice/agate.git@e90440bbee9f027459140fdfdb0478a8078338f9#egg=agate
alabaster==0.7.16
babel==2.17.0
cachetools==5.5.2
certifi==2025.1.31
chardet==5.2.0
charset-normalizer==3.4.1
colorama==0.4.6
coverage==7.8.0
distlib==0.3.9
docutils==0.21.2
exceptiongroup==1.2.2
filelock==3.18.0
idna==3.10
imagesize==1.4.1
importlib_metadata==8.6.1
iniconfig==2.1.0
isodate==0.7.2
Jinja2==3.1.6
MarkupSafe==3.0.2
nose==1.3.7
packaging==24.2
parsedatetime==2.6
platformdirs==4.3.7
pluggy==1.5.0
Pygments==2.19.1
pyproject-api==1.9.0
pytest==8.3.5
pytimeparse==1.1.8
pytz==2025.2
requests==2.32.3
six==1.17.0
snowballstemmer==2.2.0
Sphinx==7.4.7
sphinx-rtd-theme==3.0.2
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
tomli==2.2.1
tox==4.25.0
typing_extensions==4.13.0
urllib3==2.3.0
virtualenv==20.29.3
zipp==3.21.0

name: agate
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.16
      - babel==2.17.0
      - cachetools==5.5.2
      - certifi==2025.1.31
      - chardet==5.2.0
      - charset-normalizer==3.4.1
      - colorama==0.4.6
      - coverage==7.8.0
      - distlib==0.3.9
      - docutils==0.21.2
      - exceptiongroup==1.2.2
      - filelock==3.18.0
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==8.6.1
      - iniconfig==2.1.0
      - isodate==0.7.2
      - jinja2==3.1.6
      - markupsafe==3.0.2
      - nose==1.3.7
      - packaging==24.2
      - parsedatetime==2.6
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - pygments==2.19.1
      - pyproject-api==1.9.0
      - pytest==8.3.5
      - pytimeparse==1.1.8
      - pytz==2025.2
      - requests==2.32.3
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==7.4.7
      - sphinx-rtd-theme==3.0.2
      - sphinxcontrib-applehelp==2.0.0
      - sphinxcontrib-devhelp==2.0.0
      - sphinxcontrib-htmlhelp==2.1.0
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==2.0.0
      - sphinxcontrib-serializinghtml==2.0.0
      - tomli==2.2.1
      - tox==4.25.0
      - typing-extensions==4.13.0
      - urllib3==2.3.0
      - virtualenv==20.29.3
      - zipp==3.21.0
prefix: /opt/conda/envs/agate

tests/test_computations.py::TestTableComputation::test_percentile_rank
tests/test_computations.py::TestTableComputation::test_change tests/test_computations.py::TestTableComputation::test_change_mixed_types tests/test_computations.py::TestTableComputation::test_change_nulls tests/test_computations.py::TestTableComputation::test_changed_invalid_types tests/test_computations.py::TestTableComputation::test_formula tests/test_computations.py::TestTableComputation::test_formula_invalid tests/test_computations.py::TestTableComputation::test_formula_no_validate tests/test_computations.py::TestTableComputation::test_percent tests/test_computations.py::TestTableComputation::test_percent_change tests/test_computations.py::TestTableComputation::test_percent_change_invalid_columns tests/test_computations.py::TestTableComputation::test_percent_nulls tests/test_computations.py::TestTableComputation::test_percent_total_override tests/test_computations.py::TestTableComputation::test_percent_zeros tests/test_computations.py::TestTableComputation::test_percentile_rank_invalid_types tests/test_computations.py::TestTableComputation::test_rank_number tests/test_computations.py::TestTableComputation::test_rank_number_key tests/test_computations.py::TestTableComputation::test_rank_number_reverse tests/test_computations.py::TestTableComputation::test_rank_number_reverse_key tests/test_computations.py::TestTableComputation::test_rank_text tests/test_computations.py::TestDateAndTimeComputations::test_change_dates tests/test_computations.py::TestDateAndTimeComputations::test_change_datetimes tests/test_computations.py::TestDateAndTimeComputations::test_change_timedeltas
agate/utils.py
agate/utils.py