{% extends "pages/base.html" %} {% load i18n %} {% block title %}{% trans "MTG Hypergeometric Calculator" %}{% endblock %} {% block content %}

{% trans "Magic: The Gathering Hypergeometric Calculator" %}

{% include "awg/_calculator_nav.html" with active_calculator="mtg_hypergeometric" %}
{% csrf_token %}
{% trans "Optional: leave empty if exact odds are not needed." %}
{% if not result and not error %}
{% blocktrans trimmed %} Use this calculator to estimate opening-hand and draw-step consistency for key cards. This tool uses hypergeometric distribution assumptions (draws without replacement) and is ideal for MTG mulligan and deck-construction planning. {% endblocktrans %}
{% if templates %}

{% trans "Or try a pre-loaded preset:" %}

    {% for t in templates %}
  • {{ t.name }} {% if t.description %}- {{ t.description }}{% endif %}
  • {% endfor %}
{% endif %} {% else %} {% if error %}

{% blocktrans %}Error: {{ error }}{% endblocktrans %}

{% elif result %}

{% trans "Calculator Results" %}

{% if result.probability_exact is not None %} {% endif %}
{% trans "Chance of at least target amount" %}{{ result.probability_at_least|floatformat:4 }}
{% trans "Chance of any target card" %}{{ result.probability_any|floatformat:4 }}
{% trans "Chance of no target cards" %}{{ result.probability_none|floatformat:4 }}
{% trans "Chance of exact target amount" %}{{ result.probability_exact|floatformat:4 }}
{% endif %}
{% endif %}
{% endblock %}